summaryrefslogtreecommitdiff
path: root/themes/okadmin/templates
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-04-21 18:02:31 -0400
committerJules Laplace <jules@okfoc.us>2016-04-21 18:02:31 -0400
commitf76ec56f3d70da6359905e9b9666f581599edd4f (patch)
tree46111a091e729b942decac816b6640b601be2918 /themes/okadmin/templates
parent1d5c1c1525dbefd7891acbdf7492ee9e62e24e16 (diff)
fix issue with single input fields, store image width/heightv0.1.34
Diffstat (limited to 'themes/okadmin/templates')
-rw-r--r--themes/okadmin/templates/partials/inputs.liquid18
1 files changed, 16 insertions, 2 deletions
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid
index 373e580..e71f4ad 100644
--- a/themes/okadmin/templates/partials/inputs.liquid
+++ b/themes/okadmin/templates/partials/inputs.liquid
@@ -48,6 +48,8 @@
<div class="image-element">
<input class="uri" type="hidden" name="{{name}}[uri]" value="{{spec.value.uri}}">
<textarea class="caption" name="{{name}}[caption]">{{spec.value.caption | escape}}</textarea>
+ <input type="hidden" name="{{name}}[width]" value="{{spec.value.width}}" class="image-width">
+ <input type="hidden" name="{{name}}[height]" value="{{spec.value.height}}" class="image-height">
<img src="{{spec.value.uri}}" alt="{{spec.value.caption | escape}}">
<button class="remove">x</button>
</div>
@@ -154,6 +156,8 @@
<input class="uri" type="hidden" name="{{name}}[][uri]" value="">
<textarea class="caption" name="{{name}}[][caption]"></textarea>
<input type="hidden" name="{{name}}[][type]" value="image">
+ <input type="hidden" name="{{name}}[][width]" class="image-width" hidden>
+ <input type="hidden" name="{{name}}[][height]" class="image-height" hidden>
<img>
<button class="remove">x</button>
</li>
@@ -165,8 +169,8 @@
<input name="{{name}}[][type]" type="hidden" class="video-type" hidden>
<input name="{{name}}[][token]" type="hidden" class="video-token" hidden>
<input name="{{name}}[][uri]" type="hidden" class="video-uri" hidden>
- <input name="{{name}}[][width]" value="{{image.width}}" type="hidden" class="video-width" hidden>
- <input name="{{name}}[][height]" value="{{image.height}}" type="hidden" class="video-height" hidden>
+ <input name="{{name}}[][width]" type="hidden" class="video-width" hidden>
+ <input name="{{name}}[][height]" type="hidden" class="video-height" hidden>
<label>Caption</label>
<input name="{{name}}[][title]" type="text" class="video-title">
<label>Thumbnail</label>
@@ -249,6 +253,8 @@
<li class="image-element">
<label>Caption</label>
<input type="hidden" name="{{name}}[][uri]" value="{{image.uri}}">
+ <input name="{{name}}[{{forloop.index0}}][width]" value="{{image.width}}" type="hidden" class="image-width" hidden>
+ <input name="{{name}}[{{forloop.index0}}][height]" value="{{image.height}}" type="hidden" class="image-height" hidden>
<textarea class="caption" name="{{name}}[][caption]">{{image.caption | escape}}</textarea>
<input type="hidden" name="{{name}}[][type]" value="image">
<img src="{{image.uri}}" alt="{{image.caption | strip_html}}">
@@ -271,6 +277,8 @@
<script type="text/html" class="image-template">
<li class="image-element">
<input class="uri" type="hidden" name="{{name}}[][uri]" value="">
+ <input type="hidden" name="{{name}}[][width]" class="image-width" hidden>
+ <input type="hidden" name="{{name}}[][height]" class="image-height" hidden>
<textarea class="caption" name="{{name}}[][caption]"></textarea>
<img>
<button class="remove">x</button>
@@ -281,6 +289,8 @@
{% for image in spec.value %}
<li class="image-element">
<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">
<textarea class="caption" name="{{name}}[{{forloop.index0}}][caption]">{{image.caption | escape}}</textarea>
<img src="{{image.uri}}" alt="{{image.caption | strip_html}}">
<button class="remove">x</button>
@@ -303,6 +313,8 @@
<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="Name">
<input class="caption" name="{{name}}[][caption]" placeholder="Email">
</li>
@@ -314,6 +326,8 @@
<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="Name">
<input class="caption" name="{{name}}[{{forloop.index0}}][caption]" value="{{image.caption | escape}}" placeholder="Email">
</li>