Просмотр исходного кода

disabled -> readonly

use readonly to send input values because express-form sets value for disabled inputs and it leads to a invalid update
utsushiiro 7 лет назад
Родитель
Сommit
6b08527e9f
1 измененных файлов с 10 добавлено и 10 удалено
  1. 10 10
      src/server/views/admin/widget/passport/saml.html

+ 10 - 10
src/server/views/admin/widget/passport/saml.html

@@ -21,14 +21,14 @@
                  value="true"
                  value="true"
                  type="radio"
                  type="radio"
                  {% if true === isSamlEnabled %}checked{% endif %}
                  {% if true === isSamlEnabled %}checked{% endif %}
-                 {% if useOnlyEnvVars %}disabled{% endif %}> ON
+                 {% if useOnlyEnvVars %}readonly{% endif %}> ON
         </label>
         </label>
         <label class="btn btn-default btn-rounded btn-outline {% if !isSamlEnabled %}active{% endif %}" data-active-class="default">
         <label class="btn btn-default btn-rounded btn-outline {% if !isSamlEnabled %}active{% endif %}" data-active-class="default">
           <input name="{{nameForIsSamlEnabled}}"
           <input name="{{nameForIsSamlEnabled}}"
                  value="false"
                  value="false"
                  type="radio"
                  type="radio"
                  {% if !isSamlEnabled %}checked{% endif %}
                  {% if !isSamlEnabled %}checked{% endif %}
-                 {% if useOnlyEnvVars %}disabled{% endif %}> OFF
+                 {% if useOnlyEnvVars %}readonly{% endif %}> OFF
         </label>
         </label>
       </div>
       </div>
     </div>
     </div>
@@ -82,7 +82,7 @@
                    type="text"
                    type="text"
                    name="settingForm[security:passport-saml:entryPoint]"
                    name="settingForm[security:passport-saml:entryPoint]"
                    value="{{ getConfigFromDB('crowi', 'security:passport-saml:entryPoint') || '' }}"
                    value="{{ getConfigFromDB('crowi', 'security:passport-saml:entryPoint') || '' }}"
-                   {% if useOnlyEnvVars %}disabled{% endif %}>
+                   {% if useOnlyEnvVars %}readonly{% endif %}>
           </td>
           </td>
           <td>
           <td>
             <input class="form-control"
             <input class="form-control"
@@ -103,7 +103,7 @@
                    type="text"
                    type="text"
                    name="settingForm[security:passport-saml:issuer]"
                    name="settingForm[security:passport-saml:issuer]"
                    value="{{ getConfigFromDB('crowi', 'security:passport-saml:issuer') || '' }}"
                    value="{{ getConfigFromDB('crowi', 'security:passport-saml:issuer') || '' }}"
-                   {% if useOnlyEnvVars %}disabled{% endif %}>
+                   {% if useOnlyEnvVars %}readonly{% endif %}>
           </td>
           </td>
           <td>
           <td>
             <input class="form-control"
             <input class="form-control"
@@ -139,7 +139,7 @@
                  type="text"
                  type="text"
                  name="settingForm[security:passport-saml:attrMapId]"
                  name="settingForm[security:passport-saml:attrMapId]"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapId') || '' }}"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapId') || '' }}"
-                 {% if useOnlyEnvVars %}disabled{% endif %}>
+                 {% if useOnlyEnvVars %}readonly{% endif %}>
           <p class="help-block">
           <p class="help-block">
             <small>
             <small>
               {{ t("security_setting.SAML.id_detail") }}
               {{ t("security_setting.SAML.id_detail") }}
@@ -165,7 +165,7 @@
                  type="text"
                  type="text"
                  name="settingForm[security:passport-saml:attrMapUsername]"
                  name="settingForm[security:passport-saml:attrMapUsername]"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapUsername') || '' }}"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapUsername') || '' }}"
-                 {% if useOnlyEnvVars %}disabled{% endif %}>
+                 {% if useOnlyEnvVars %}readonly{% endif %}>
           <p class="help-block">
           <p class="help-block">
             <small>
             <small>
               {{ t("security_setting.SAML.username_detail") }}
               {{ t("security_setting.SAML.username_detail") }}
@@ -191,7 +191,7 @@
                  type="text"
                  type="text"
                  name="settingForm[security:passport-saml:attrMapMail]"
                  name="settingForm[security:passport-saml:attrMapMail]"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapMail') || '' }}"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapMail') || '' }}"
-                 {% if useOnlyEnvVars %}disabled{% endif %}>
+                 {% if useOnlyEnvVars %}readonly{% endif %}>
           <p class="help-block">
           <p class="help-block">
             <small>
             <small>
               {{ t("security_setting.SAML.mapping_detail", t("Email")) }}
               {{ t("security_setting.SAML.mapping_detail", t("Email")) }}
@@ -216,7 +216,7 @@
                  type="text"
                  type="text"
                  name="settingForm[security:passport-saml:attrMapFirstName]"
                  name="settingForm[security:passport-saml:attrMapFirstName]"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapFirstName') || '' }}"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapFirstName') || '' }}"
-                 {% if useOnlyEnvVars %}disabled{% endif %}>
+                 {% if useOnlyEnvVars %}readonly{% endif %}>
           <p class="help-block">
           <p class="help-block">
             <small>
             <small>
               {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.First Name")) }}
               {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.First Name")) }}
@@ -243,7 +243,7 @@
                  type="text"
                  type="text"
                  name="settingForm[security:passport-saml:attrMapLastName]"
                  name="settingForm[security:passport-saml:attrMapLastName]"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapLastName') || '' }}"
                  value="{{ getConfigFromDB('crowi', 'security:passport-saml:attrMapLastName') || '' }}"
-                 {% if useOnlyEnvVars %}disabled{% endif %}>
+                 {% if useOnlyEnvVars %}readonly{% endif %}>
           <p class="help-block">
           <p class="help-block">
             <small>
             <small>
               {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.Last Name")) }}
               {{ t("security_setting.SAML.mapping_detail", t("security_setting.SAML.Last Name")) }}
@@ -327,7 +327,7 @@
                       type="text"
                       type="text"
                       rows="5"
                       rows="5"
                       name="settingForm[security:passport-saml:cert]"
                       name="settingForm[security:passport-saml:cert]"
-                      {% if useOnlyEnvVars %}disabled{% endif %}
+                      {% if useOnlyEnvVars %}readonly{% endif %}
             >{{ getConfigFromDB('crowi', 'security:passport-saml:cert') || '' }}</textarea>
             >{{ getConfigFromDB('crowi', 'security:passport-saml:cert') || '' }}</textarea>
             <p class="help-block">
             <p class="help-block">
               <small>
               <small>