summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/okadmin/public/css/main.css6
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid9
2 files changed, 10 insertions, 5 deletions
diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css
index 1c02066..c5694eb 100644
--- a/themes/okadmin/public/css/main.css
+++ b/themes/okadmin/public/css/main.css
@@ -134,7 +134,8 @@ label {
}
.main.resource form input,
-.main.resource form textarea {
+.main.resource form textarea,
+.main.resource form select {
display: block;
float: left;
width: 20em;
@@ -150,6 +151,9 @@ label {
padding: 0.5em;
height: 15em;
}
+.main.resource form select {
+ margin-top: 0.5em;
+}
.main.resource form button {
float: left;
padding: 0.5em;
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index ad5beab..551a66c 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -5,26 +5,27 @@
<div class="property">
<label for="{{name}}">{{name | capitalize}}</label>
+
{% if type == 'string' %}
<input
{% if spec.disabled %}
disabled="true"
{% endif %}
name="{{name}}" type="text" value="{{spec.value}}">
- {% else if type == 'text' %}
+ {% elsif type == 'text' %}
<textarea
{% if spec.disabled %}
disabled="true"
{% endif %}
name="{{name}}">{{spec.value}}</textarea>
- {% else if type == 'enum' %}
+ {% elsif type == 'enum' %}
<select
{% if spec.disabled %}
disabled="true"
{% endif %}
name="{{name}}">
- {% for option in spec.values %}
- {{spec.value}}
+ {% for option in spec.options %}
+ <option value="{{option}}" {% if option == spec.value %}selected{% endif %}>{{option}}</option>
{% endfor %}
</select>
{% else %}