Lines 3-69
Link Here
|
3 |
[% USE ClassSources %] |
3 |
[% USE ClassSources %] |
4 |
[% USE ItemTypes %] |
4 |
[% USE ItemTypes %] |
5 |
[% IF wrap_fieldset != 0 %] |
5 |
[% IF wrap_fieldset != 0 %] |
6 |
<fieldset class="rows"> |
6 |
<fieldset class="rows" id="additional_fields_form_section"> |
7 |
<legend>Additional fields</legend> |
7 |
<legend>Additional fields</legend> |
8 |
<ol> |
8 |
<ol> |
9 |
[% END %] |
9 |
[% END %] |
10 |
[% FOR field IN available %] |
10 |
[% FOR field IN available %] |
11 |
[% authorised_value_category = field.effective_authorised_value_category %] |
11 |
[% authorised_value_category = field.effective_authorised_value_category %] |
12 |
<li> |
12 |
[% IF authorised_value_category %] |
|
|
13 |
<li> |
13 |
<label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label> |
14 |
<label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label> |
14 |
[% IF authorised_value_category %] |
15 |
[% IF field.marcfield && field.marcfield_mode == 'get' %] |
15 |
[% IF field.marcfield && field.marcfield_mode == 'get' %] |
16 |
<select name="additional_field_[% field.id | html %]" id="additional_field_[% field.id | html %]" class="marcfieldget" disabled> |
16 |
<select name="additional_field_[% field.id | html %]" id="additional_field_[% field.id | html %]" disabled> |
17 |
[% ELSE %] |
17 |
[% ELSE %] |
18 |
[% IF !field.repeatable %] |
18 |
<select name="additional_field_[% field.id | html %]" id="additional_field_[% field.id | html %]"> |
19 |
<select name="additional_field_[% field.id | html %]" id="additional_field_[% field.id | html %]"> |
19 |
[% END %] |
20 |
[% END %] |
|
|
21 |
[% END %] |
22 |
[% IF !field.repeatable %] |
20 |
<option value=""></option> |
23 |
<option value=""></option> |
21 |
[% IF authorised_value_category == 'branches' %] |
24 |
[% END %] |
22 |
[% FOREACH branch IN Branches.all() %] |
25 |
[% IF authorised_value_category == 'branches' %] |
23 |
[% IF branch.branchcode == values.${field.id} %] |
26 |
[% FOREACH branch IN Branches.all() %] |
24 |
<option value="[% branch.branchcode | html %]" selected="selected">[% branch.branchname | html %]</option> |
27 |
[% IF branch.branchcode == values.${field.id}.0 %] |
25 |
[% ELSE %] |
28 |
<option value="[% branch.branchcode | html %]" selected="selected">[% branch.branchname | html %]</option> |
26 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
29 |
[% ELSE %] |
27 |
[% END %] |
30 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
28 |
[% END %] |
31 |
[% END %] |
29 |
[% ELSIF authorised_value_category == 'cn_source' %] |
32 |
[% END %] |
30 |
[% FOREACH class_source IN ClassSources.all({ selected => values.${field.id} }) %] |
33 |
[% ELSIF authorised_value_category == 'cn_source' %] |
31 |
[% IF class_source.cn_source == values.${field.id} %] |
34 |
[% FOREACH class_source IN ClassSources.all({ selected => values.${field.id} }) %] |
32 |
<option value="[% class_source.cn_source | html %]" selected="selected">[% class_source.description | html %]</option> |
35 |
[% IF class_source.cn_source == values.${field.id}.0 %] |
33 |
[% ELSE %] |
36 |
<option value="[% class_source.cn_source | html %]" selected="selected">[% class_source.description | html %]</option> |
34 |
<option value="[% class_source.cn_source | html %]">[% class_source.description | html %]</option> |
37 |
[% ELSE %] |
35 |
[% END %] |
38 |
<option value="[% class_source.cn_source | html %]">[% class_source.description | html %]</option> |
36 |
[% END %] |
39 |
[% END %] |
37 |
[% ELSIF authorised_value_category == 'itemtypes' %] |
40 |
[% END %] |
38 |
[% FOREACH itemtype IN ItemTypes.Get() %] |
41 |
[% ELSIF authorised_value_category == 'itemtypes' %] |
39 |
[% IF itemtype.itemtype == values.${field.id} %] |
42 |
[% FOREACH itemtype IN ItemTypes.Get() %] |
40 |
<option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option> |
43 |
[% IF itemtype.itemtype == values.${field.id}.0 %] |
41 |
[% ELSE %] |
44 |
<option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option> |
42 |
<option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option> |
45 |
[% ELSE %] |
43 |
[% END %] |
46 |
<option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option> |
44 |
[% END %] |
47 |
[% END %] |
45 |
[% ELSE %] |
48 |
[% END %] |
46 |
[% FOREACH av IN AuthorisedValues.GetAuthValueDropbox( authorised_value_category ) %] |
49 |
[% ELSE %] |
47 |
[% IF av.authorised_value == values.${field.id} %] |
50 |
[% FOREACH av IN AuthorisedValues.GetAuthValueDropbox( authorised_value_category ) %] |
|
|
51 |
[% IF !field.repeatable %] |
52 |
[% IF av.authorised_value == values.${field.id}.0 %] |
48 |
<option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option> |
53 |
<option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option> |
49 |
[% ELSE %] |
54 |
[% ELSE %] |
50 |
<option value="[% av.authorised_value | html %]">[% av.lib | html %]</option> |
55 |
<option value="[% av.authorised_value | html %]">[% av.lib | html %]</option> |
51 |
[% END %] |
56 |
[% END %] |
|
|
57 |
[% ELSE %] |
58 |
[% SET av_field_value_rendered = 0 %] |
59 |
[% FOR value IN values.${field.id} %] |
60 |
[% IF av.authorised_value == value %] |
61 |
<label class="radio"> |
62 |
<input type="checkbox" id="additional_field_[% field.id | html %]" checked name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]">[% av.lib | html %] |
63 |
</label> |
64 |
[% SET av_field_value_rendered = 1 %] |
65 |
[% END %] |
66 |
[% END %] |
67 |
[% IF !av_field_value_rendered %] |
68 |
<label class="radio"> |
69 |
<input type="checkbox" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" value="[% av.authorised_value | html %]">[% av.lib | html %] |
70 |
</label> |
71 |
[% END %] |
52 |
[% END %] |
72 |
[% END %] |
53 |
[% END %] |
73 |
[% END %] |
54 |
</select> <span>(Authorised values for [% authorised_value_category | html %])</span> |
74 |
[% END %] |
55 |
[% ELSIF field.marcfield && field.marcfield_mode == 'get' %] |
75 |
</select> |
56 |
<input type="text" value="[% values.${field.id} | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" readonly="readonly" /> |
76 |
[% IF !search_form %] |
57 |
[% ELSE %] |
77 |
<span>(Authorised values for [% authorised_value_category | html %])</span> |
58 |
<input type="text" value="[% values.${field.id} | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" /> |
78 |
[% IF field.marcfield && field.marcfield_mode == 'get' %] |
|
|
79 |
This value will be filled with the [% field.marcfield | html %] subfield of the selected bibliographic record. |
80 |
[% ELSIF field.marcfield && field.marcfield_mode == 'set' %] |
81 |
This value will be saved to the [% field.marcfield | html %] subfield of the selected bibliographic record. |
82 |
[% END %] |
59 |
[% END %] |
83 |
[% END %] |
|
|
84 |
</li> |
60 |
|
85 |
|
61 |
[% IF field.marcfield && field.marcfield_mode == 'get' %] |
86 |
[% ELSIF field.marcfield && field.marcfield_mode == 'get' %] |
|
|
87 |
<li> |
88 |
<label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label> |
89 |
<input type="text" value="[% values.${field.id}.0 | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" readonly="readonly" /> |
90 |
[% IF !search_form %] |
62 |
This value will be filled with the [% field.marcfield | html %] subfield of the selected bibliographic record. |
91 |
This value will be filled with the [% field.marcfield | html %] subfield of the selected bibliographic record. |
63 |
[% ELSIF field.marcfield && field.marcfield_mode == 'set' %] |
92 |
[% END %] |
|
|
93 |
</li> |
94 |
[% ELSE %] |
95 |
[% SET text_field_value_rendered = 0 %] |
96 |
[% FOR value IN values.${field.id} %] |
97 |
<li> |
98 |
<label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label> |
99 |
<input type="text" value="[% value | html %]" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" /> |
100 |
[% UNLESS search_form == 1 %] |
101 |
<a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a> |
102 |
[% END %] |
103 |
[% IF field.repeatable && !search_form %] |
104 |
<a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a> |
105 |
[% END %] |
106 |
[% SET text_field_value_rendered = 1 %] |
107 |
[% END %] |
108 |
[% IF !text_field_value_rendered %] |
109 |
<li> |
110 |
<label for="additional_field_[% field.id | html %]"> [% field.name | html %]: </label> |
111 |
<input type="text" id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]" /> |
112 |
[% UNLESS search_form == 1 %] |
113 |
<a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a> |
114 |
[% END %] |
115 |
[% IF field.repeatable && !search_form %] |
116 |
<a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a> |
117 |
[% END %] |
118 |
[% END %] |
119 |
[% IF field.marcfield && field.marcfield_mode == 'set' && !search_form %] |
64 |
This value will be saved to the [% field.marcfield | html %] subfield of the selected bibliographic record. |
120 |
This value will be saved to the [% field.marcfield | html %] subfield of the selected bibliographic record. |
65 |
[% END %] |
121 |
[% END %] |
66 |
</li> |
122 |
</li> |
|
|
123 |
[% END %] |
67 |
[% END %] |
124 |
[% END %] |
68 |
[% IF wrap_fieldset != 0 %] |
125 |
[% IF wrap_fieldset != 0 %] |
69 |
</ol> |
126 |
</ol> |