diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-03-28 13:59:50 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-03-28 13:59:50 -0400 |
| commit | 8898bbe48285c7f9f11760ef420cca43d683d5e0 (patch) | |
| tree | 00a2e6c49ddd6894c60e893bfd8426363a3d4a05 /themes/okadmin/templates/partials/inputs.liquid | |
| parent | 57026202f9ac0b98cc744734a04bcee362b789a3 (diff) | |
modify links field to specify text and uri
Diffstat (limited to 'themes/okadmin/templates/partials/inputs.liquid')
| -rw-r--r-- | themes/okadmin/templates/partials/inputs.liquid | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index c6efc68..55d5fb8 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -79,26 +79,58 @@ value="{{spec.value}}" placeholder="Enter a comma separated list of tags."> </div> - {% elsif type == 'link-list' %} + {% elsif type == 'link-list' %} <div class="link-list group"> <div class="links"> - {% for url in spec.value %} - <input - name="{{name}}[{{forloop.index0}}]" - value="{{url}}" - type="text" - class="link-input"> - <button class="remove-link-btn" - data-for="{{name}}[{{forloop.index0}}]"> - - - </button> + {% for link in spec.value %} + <li> + <input + name="{{name}}[][text]" + value="{{link.text}}" + type="text" + placeholder="Link text" + class="link-input link-text"> + <input + name="{{name}}[][uri]" + value="{{link.uri}}" + type="text" + placeholder="URL" + class="link-input link-uri"> + <button class="remove-link-btn"> + - + </button> + </li> {% endfor %} </div> <input type="text" - class="link-input-new" + class="link-input-new link-text" + placeholder="Link text"> + <input type="text" + class="link-input-new link-uri" placeholder="http://www.example.com"> <button class="add-link-btn">+</button> + + <script type="text/html" class="link-template"> + <li> + <input + name="{{name}}[][text]" + value="" + type="text" + placeholder="Link text" + class="link-input link-text"> + <input + name="{{name}}[][uri]" + value="" + type="text" + placeholder="URL" + class="link-input link-uri"> + <button class="remove-link-btn"> + - + </button> + </li> + </script> + </div> {% elsif type == 'media-list' %} |
