summaryrefslogtreecommitdiff
path: root/themes/okadmin/templates
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-10-04 11:42:18 -0400
committerJules Laplace <jules@okfoc.us>2016-10-04 11:42:18 -0400
commit7e525bc4ae191bde7cb40de2c489250cb3e0af0f (patch)
tree343781681d1af4b94e90e6498f9f72301c6fc7b0 /themes/okadmin/templates
parent51d15907484032cf47d5e7b5beffede4d9a1f791 (diff)
adding triple-captioned-image-listv0.2.1
Diffstat (limited to 'themes/okadmin/templates')
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid38
1 files changed, 38 insertions, 0 deletions
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index 19aa3a1..4750630 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -344,6 +344,44 @@
{% endfor %}
</ol>
</div>
+ {% elsif type == 'triple-captioned-image-list' %}
+ <div class="image-list group loaded">
+ <div class="fields">
+ <div class="add-image-button">
+ <input type="file" accept="image/*" multiple>
+ <button>+ Add images</button>
+ </div>
+ <input class="add-url" type="text" placeholder="+ Add URL">
+ </div>
+
+ <script type="text/html" class="image-template">
+ <li class="image-element">
+ <img>
+ <button class="remove">x</button>
+ <input class="uri" type="hidden" name="{{name}}[][uri]" value="">
+ <input type="hidden" name="{{name}}[][width]" class="image-width">
+ <input type="hidden" name="{{name}}[][height]" class="image-height">
+ <input class="caption" name="{{name}}[][label]" placeholder="Label">
+ <input class="caption" name="{{name}}[][caption]" placeholder="Caption">
+ <input class="caption" name="{{name}}[][code]" placeholder="Code">
+ </li>
+ </script>
+
+ <ol>
+ {% for image in spec.value %}
+ <li class="image-element">
+ <img src="{{image.uri}}" alt="{{image.caption | strip_html}}">
+ <button class="remove">x</button>
+ <input type="hidden" name="{{name}}[{{forloop.index0}}][uri]" value="{{image.uri}}">
+ <input type="hidden" name="{{name}}[{{forloop.index0}}][width]" value="{{image.width}}" class="image-width">
+ <input type="hidden" name="{{name}}[{{forloop.index0}}][height]" value="{{image.height}}" class="image-height">
+ <input class="caption" name="{{name}}[{{forloop.index0}}][label]" value="{{image.label | escape}}" placeholder="Label">
+ <input class="caption" name="{{name}}[{{forloop.index0}}][caption]" value="{{image.caption | escape}}" placeholder="Caption">
+ <input class="caption" name="{{name}}[{{forloop.index0}}][code]" value="{{image.code | escape}}" placeholder="Code">
+ </li>
+ {% endfor %}
+ </ol>
+ </div>
{% elsif type == 'meta' %}
<input class="hidden" type="hidden" name="{{name}}" value="{{spec.value}}">
{% else %}