|
Lines 1-34
Link Here
|
| 1 |
<fieldset class="rows"> |
1 |
<ol id="standard-fields"> |
| 2 |
<legend>Custom fields</legend> |
2 |
[% keys = whole.value.other.custom_key.split('\0') %] |
| 3 |
<ol id="standard-fields"> |
3 |
[% values = whole.value.other.custom_value.split('\0') %] |
| 4 |
[% keys = whole.value.other.custom_key.split('\0') %] |
4 |
[% i = 0 %] |
| 5 |
[% values = whole.value.other.custom_value.split('\0') %] |
5 |
[% FOREACH key IN keys %] |
| 6 |
[% i = 0 %] |
6 |
<li class="form-horizontal"> |
| 7 |
[% FOREACH key IN keys %] |
7 |
<label> </label> |
| 8 |
<li class="form-horizontal"> |
8 |
[% IF opac %] |
| 9 |
[% IF opac %] |
9 |
<input type="text" placeholder="key" class="form-control input-fluid custom-field-input custom-name" name="custom_key" value="[% key | html %]" /> |
| 10 |
<input type="text" placeholder="key" class="form-control input-fluid custom-field-input custom-name" name="custom_key" value="[% key | html %]" /> |
10 |
<input type="text" placeholder="value" class="form-control input-fluid custom-field-input" name="custom_value" id="custom-value" value="[% values.$i | html %]" /> |
| 11 |
<input type="text" placeholder="value" class="form-control input-fluid custom-field-input" name="custom_value" id="custom-value" value="[% values.$i | html %]" /> |
11 |
[% ELSE %] |
| 12 |
[% ELSE %] |
12 |
<input type="text" placeholder="key" class="custom-name" name="custom_key" value="[% key | html %]" /> |
| 13 |
<input type="text" placeholder="key" class="custom-name" name="custom_key" value="[% key | html %]" /> |
13 |
<input type="text" placeholder="value" name="custom_value" id="custom-value" value="[% values.$i | html %]" /> |
| 14 |
<input type="text" placeholder="value" name="custom_value" id="custom-value" value="[% values.$i | html %]" /> |
14 |
[% END %] |
| 15 |
[% END %] |
15 |
<button value="[% i | html %]" name="custom_delete" type="submit" class="btn btn-danger btn-sm delete-new-field"> <span class="fa fa-trash"></span> Delete </button> |
| 16 |
<button value="[% i | html %]" name="custom_delete" type="submit" class="btn btn-danger btn-sm delete-new-field"> <span class="fa fa-trash"></span> Delete </button> |
16 |
</li> |
| 17 |
</li> |
17 |
[% i = i + 1 %] |
| 18 |
[% i = i + 1 %] |
18 |
[% END %] |
| 19 |
[% END %] |
19 |
</ol> |
| 20 |
</ol> |
20 |
<div id="custom-warning" style="display:none;margin:1em;" class="error required"></div> |
| 21 |
<div id="custom-warning" style="display:none;margin:1em;" class="error required"></div> |
21 |
<button type="button" id="add-new-fields" class="btn btn-default"> |
| 22 |
<button type="button" id="add-new-fields" class="btn btn-default"> |
22 |
<span class="fa fa-plus"></span> |
| 23 |
<span class="fa fa-plus"></span> |
23 |
Add new field |
| 24 |
Add new field |
24 |
</button> |
| 25 |
</button> |
|
|
| 26 |
</fieldset> |
| 27 |
|
25 |
|
| 28 |
<style> |
26 |
<style> |
| 29 |
.custom-field-input { |
27 |
.custom-field-input { |
| 30 |
width: 25%; |
28 |
width: 25%; |
| 31 |
display: inline-block; |
29 |
display: inline-block; |
| 32 |
margin-left: 0.5em; |
|
|
| 33 |
} |
30 |
} |
| 34 |
</style> |
31 |
</style> |