Mark the service as readonly in the UI in authpam plugin
[cascardo/ipsilon.git] / templates / admin / option_config.html
index 74eede5..1f921f6 100644 (file)
                   {%- if value %}
                     value="{{ value }}"
                   {%- endif -%}
                   {%- if value %}
                     value="{{ value }}"
                   {%- endif -%}
+                  {% if v.is_readonly() -%}
+                    disabled
+                  {%- endif -%}
                 >
               {% elif v.__class__.__name__ == 'List' -%}
                 >
               {% elif v.__class__.__name__ == 'List' -%}
-                <textarea class="form-control" name="{{ v.name }}">
+                <textarea class="form-control" name="{{ v.name }}"
+                  {% if v.is_readonly() -%}
+                    disabled
+                  {%- endif -%}
+                >
                   {%- if value %}
                     {{- value|join('\n') -}}
                   {%- endif -%}
                   {%- if value %}
                     {{- value|join('\n') -}}
                   {%- endif -%}
@@ -75,6 +82,9 @@
                       {%- if value and e in value %}
                         checked="true"
                       {%- endif -%}
                       {%- if value and e in value %}
                         checked="true"
                       {%- endif -%}
+                      {% if v.is_readonly() -%}
+                        disabled
+                      {%- endif -%}
                     >&nbsp;{{ e }}
                   </div>
                 {% endfor %}
                     >&nbsp;{{ e }}
                   </div>
                 {% endfor %}
@@ -88,6 +98,9 @@
                       {%- if e == value %}
                         checked="true"
                       {%- endif -%}
                       {%- if e == value %}
                         checked="true"
                       {%- endif -%}
+                      {% if v.is_readonly() -%}
+                        disabled
+                      {%- endif -%}
                     >&nbsp;{{ e }}
                   </div>
                 {% endfor %}
                     >&nbsp;{{ e }}
                   </div>
                 {% endfor %}
                   {%- if value %}
                     checked="true"
                   {% endif -%}
                   {%- if value %}
                     checked="true"
                   {% endif -%}
+                  {% if v.is_readonly() -%}
+                    disabled
+                  {%- endif -%}
                 >
               {% elif v.__class__.__name__ == 'ComplexList' -%}
                 <table class="table table-striped extensible-table">
                 >
               {% elif v.__class__.__name__ == 'ComplexList' -%}
                 <table class="table table-striped extensible-table">
                         {%- else -%}
                           value="{{ line }}"
                         {%- endif -%}
                         {%- else -%}
                           value="{{ line }}"
                         {%- endif -%}
+                        {% if v.is_readonly() -%}
+                          disabled
+                        {%- endif -%}
                       >
                     </td>
                     <td>
                       >
                     </td>
                     <td>