summaryrefslogtreecommitdiff
path: root/themes/okadmin/templates
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-10-24 15:40:58 -0400
committerJules Laplace <jules@okfoc.us>2016-10-24 15:40:58 -0400
commit3593fb22cb19366fb1bf30c4ecfbf4428b8aad82 (patch)
treee73903cf6021c399cc7bd4dd54f4b3e2613c2de0 /themes/okadmin/templates
parentbdcc83dae3742bf1c88da43a23f7278127d6251c (diff)
key/value pairs in enums
Diffstat (limited to 'themes/okadmin/templates')
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid6
1 files changed, 5 insertions, 1 deletions
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index 55afb51..063f9b7 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -21,7 +21,11 @@
<select
name="{{name}}">
{% for option in spec.options %}
- <option value="{{option}}" {% if option == spec.value %}selected{% endif %}>{{option | capitalize}}</option>
+ {% if option.length == 2 %}
+ <option value="{{option[0]}}" {% if option[0] == spec.value %}selected{% endif %}>{{option[1] | capitalize}}</option>
+ {% else %}
+ <option value="{{option}}" {% if option == spec.value %}selected{% endif %}>{{option | capitalize}}</option>
+ {% endif %}
{% endfor %}
</select>
{% elsif type == 'video' %}