SHARE
TWEET

Untitled

a guest Mar 26th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (disabled == true || data.writable == false) {
  2.         content += "<select name=\"" + Encode.forHtml(data.id) + "\" class=\"form-control\" disabled=\"true\">";
  3.         for (var i = 0; i < data.enumValues.length; i++) {
  4.             var selected='';
  5.             if (data.value == data.enumValues[i].name) {
  6.              selected = 'selected';
  7.             }
  8.             content += "<option value=\"" + Encode.forHtml(data.enumValues[i].id) + "\" "+selected +">" + Encode.forHtml(data.enumValues[i].name) + "</option>"
  9.         }
  10.     } else {
  11.          if(data.required == true) {
  12.              content += "<select name=\"" + Encode.forHtml(data.id) + "\" class=\"form-control\" required>";
  13.              for (var i = 0; i < data.enumValues.length; i++) {
  14.                 var selected='';
  15.                 if (data.value == data.enumValues[i].name) {
  16.                  selected = 'selected';
  17.                 }
  18.                 content += "<option value=\"" + Encode.forHtml(data.enumValues[i].id) + "\" "+selected +">" + Encode.forHtml(data.enumValues[i].name) + "</option>"
  19.              }
  20.          }
  21.          else {
  22.               content += "<select name=\"" + Encode.forHtml(data.id) + "\" class=\"form-control\">";
  23.               for (var i = 0; i < data.enumValues.length; i++) {
  24.                 var selected='';
  25.                 if (data.value == data.enumValues[i].name) {
  26.                  selected = 'selected';
  27.                 }
  28.                 content += "<option value=\"" + Encode.forHtml(data.enumValues[i].id) + "\" "+selected +">" + Encode.forHtml(data.enumValues[i].name) + "</option>"
  29.               }
  30.          }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top