diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-10 22:34:39 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-04-11 01:38:38 -0400 |
| commit | 3f346a970dd0823816a5ad2b0dc2b7749e99845c (patch) | |
| tree | 1077082d2ce540ea44b766391f90816679d93086 /themes | |
| parent | 6e1f689cfd8f820090c4ab15519114f4d3bf929f (diff) | |
Hide certain inputs in template
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/okadmin/public/css/main.css | 4 | ||||
| -rw-r--r-- | themes/okadmin/templates/partials/inputs.liquid | 20 |
2 files changed, 17 insertions, 7 deletions
diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index ad940e8..73f9735 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -278,3 +278,7 @@ li.image-element .remove-image:hover { .clear { clear: both; } + +.hidden { + display: none; +} diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 7cede76..99258f3 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -4,24 +4,28 @@ {% assign type = spec.type %} <div class="property {{type}}"> - <label for="{{name}}">{{name | capitalize}}</label> + <label + {% if spec.hidden %} + class="hidden" + {% endif %} + for="{{name}}">{{name | capitalize}}</label> {% if type == 'string' %} <input - {% if spec.disabled %} - disabled="true" + {% if spec.hidden %} + class="hidden" {% endif %} name="{{name}}" type="text" value="{{spec.value}}"> {% elsif type == 'text' %} <textarea - {% if spec.disabled %} - disabled="true" + {% if spec.hidden %} + class="hidden" {% endif %} name="{{name}}">{{spec.value}}</textarea> {% elsif type == 'enum' %} <select - {% if spec.disabled %} - disabled="true" + {% if spec.hidden %} + class="hidden" {% endif %} name="{{name}}"> {% for option in spec.options %} @@ -64,6 +68,8 @@ </li> </script> </div> + {% elsif type == 'meta' %} + <input class="hidden" type="hidden" name="{{name}}" value="{{spec.value}}"> {% else %} <p><pre style="color: red">Admin template doesn't support '{{type}}' properties!</pre></p> {% endif %} |
