|
Lines 23-28
Link Here
|
| 23 |
document.form.state.value=RegExp.$3; |
23 |
document.form.state.value=RegExp.$3; |
| 24 |
document.form.country.value=RegExp.$4; |
24 |
document.form.country.value=RegExp.$4; |
| 25 |
}); |
25 |
}); |
|
|
26 |
|
| 27 |
[% IF category_type %] |
| 28 |
update_category_code( "[% category_type %]" ); |
| 29 |
[% ELSE %] |
| 30 |
if ( $("#categorycode").length > 0 ){ |
| 31 |
var category_type = $("#categorycode").find("option:selected").attr("data-typename"); |
| 32 |
update_category_code( category_type ); |
| 33 |
} |
| 34 |
[% END %] |
| 35 |
|
| 26 |
}); |
36 |
}); |
| 27 |
|
37 |
|
| 28 |
function clear_entry(node) { |
38 |
function clear_entry(node) { |
|
Lines 51-56
Link Here
|
| 51 |
$("select#patron_attr_" + newId, clone).attr('value',''); |
61 |
$("select#patron_attr_" + newId, clone).attr('value',''); |
| 52 |
original.parentNode.insertBefore(clone, original.nextSibling); |
62 |
original.parentNode.insertBefore(clone, original.nextSibling); |
| 53 |
} |
63 |
} |
|
|
64 |
|
| 65 |
function update_category_code(category_type) { |
| 66 |
var mytable = $("#attributes_table>tbody"); |
| 67 |
|
| 68 |
mytable.find("tr").each(function(){ |
| 69 |
$(this).hide() |
| 70 |
}); |
| 71 |
|
| 72 |
mytable.find("tr[data-category_type="+category_type+"]").each(function(){ |
| 73 |
$(this).show(); |
| 74 |
}); |
| 75 |
mytable.find("tr[data-category_type='']").each(function(){ |
| 76 |
$(this).show(); |
| 77 |
}); |
| 78 |
|
| 79 |
} |
| 80 |
|
| 54 |
var MSG_SEPARATOR = _("Separator must be / in field "); |
81 |
var MSG_SEPARATOR = _("Separator must be / in field "); |
| 55 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field "); |
82 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field "); |
| 56 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); |
83 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); |
|
Lines 890-914
Link Here
|
| 890 |
</li> |
917 |
</li> |
| 891 |
<li> |
918 |
<li> |
| 892 |
<label for="categorycode">Category: </label> |
919 |
<label for="categorycode">Category: </label> |
| 893 |
<select id="categorycode" name="categorycode"> |
920 |
<select id="categorycode" name="categorycode" onchange="update_category_code(this);"> |
| 894 |
[% FOREACH typeloo IN typeloop %] |
921 |
[% FOREACH typeloo IN typeloop %] |
| 895 |
[% FOREACH categoryloo IN typeloo.categoryloop %] |
922 |
[% FOREACH categoryloo IN typeloo.categoryloop %] |
| 896 |
[% IF ( loop.first ) %] |
923 |
[% IF ( loop.first ) %] |
| 897 |
[% IF ( categoryloo.typename_C ) %]<optgroup label="Child">[% END %] |
924 |
[% IF ( categoryloo.typename_C ) %]<optgroup label="Child" value="C">[% END %] |
| 898 |
[% IF ( categoryloo.typename_A ) %]<optgroup label="Adult">[% END %] |
925 |
[% IF ( categoryloo.typename_A ) %]<optgroup label="Adult" value="A">[% END %] |
| 899 |
[% IF ( categoryloo.typename_S ) %]<optgroup label="Staff">[% END %] |
926 |
[% IF ( categoryloo.typename_S ) %]<optgroup label="Staff" value="S">[% END %] |
| 900 |
[% IF ( categoryloo.typename_I ) %]<optgroup label="Organization">[% END %] |
927 |
[% IF ( categoryloo.typename_I ) %]<optgroup label="Organization" value="I">[% END %] |
| 901 |
[% IF ( categoryloo.typename_P ) %]<optgroup label="Professional">[% END %] |
928 |
[% IF ( categoryloo.typename_P ) %]<optgroup label="Professional" value="P">[% END %] |
| 902 |
[% IF ( categoryloo.typename_X ) %]<optgroup label="Statistical">[% END %] |
929 |
[% IF ( categoryloo.typename_X ) %]<optgroup label="Statistical" value="X">[% END %] |
| 903 |
[% END %] |
930 |
[% END %] |
| 904 |
[% IF ( categoryloo.categorycodeselected ) %] |
931 |
[% IF ( categoryloo.categorycodeselected ) %] |
| 905 |
<option value="[% categoryloo.categorycode %]" selected="selected">[% categoryloo.categoryname %]</option> |
932 |
<option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option> |
| 906 |
[% ELSE %] |
933 |
[% ELSE %] |
| 907 |
<option value="[% categoryloo.categorycode %]">[% categoryloo.categoryname %]</option> |
934 |
<option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option> |
| 908 |
[% END %] |
935 |
[% END %] |
| 909 |
[% IF ( loop.last ) %] |
936 |
[% IF ( loop.last ) %] |
| 910 |
</optgroup> |
937 |
</optgroup> |
| 911 |
[% END %] |
938 |
[% END %] |
| 912 |
[% END %] |
939 |
[% END %] |
| 913 |
[% END %] |
940 |
[% END %] |
| 914 |
</select> |
941 |
</select> |
|
Lines 1180-1193
Link Here
|
| 1180 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
1207 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
| 1181 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
1208 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
| 1182 |
<legend>Additional attributes and identifiers</legend> |
1209 |
<legend>Additional attributes and identifiers</legend> |
| 1183 |
<table> |
1210 |
<table id="attributes_table"> |
| 1184 |
<tr> |
1211 |
<thead> |
| 1185 |
<th>Type</th> |
1212 |
<tr> |
| 1186 |
<th colspan="2">Value</th> |
1213 |
<th>Class</th> |
| 1187 |
</tr> |
1214 |
<th>Type</th> |
|
|
1215 |
<th colspan="2">Value</th> |
| 1216 |
</tr> |
| 1217 |
</thead> |
| 1218 |
<tbody> |
| 1188 |
[% FOREACH patron_attribute IN patron_attributes %] |
1219 |
[% FOREACH patron_attribute IN patron_attributes %] |
| 1189 |
<tr> |
1220 |
<tr data-category_type="[% patron_attribute.category_type %]"> |
| 1190 |
<td>[% patron_attribute.code %] ([% patron_attribute.description %]) |
1221 |
<td>[% patron_attribute.class %]</td> |
|
|
1222 |
<td> |
| 1223 |
[% patron_attribute.code %] ([% patron_attribute.description %]) |
| 1191 |
</td> |
1224 |
</td> |
| 1192 |
<td> |
1225 |
<td> |
| 1193 |
<input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> |
1226 |
<input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> |
|
Lines 1228-1233
Link Here
|
| 1228 |
</td> |
1261 |
</td> |
| 1229 |
</tr> |
1262 |
</tr> |
| 1230 |
[% END %] |
1263 |
[% END %] |
|
|
1264 |
</tbody> |
| 1231 |
</table> |
1265 |
</table> |
| 1232 |
</fieldset> |
1266 |
</fieldset> |
| 1233 |
[% END %][% END %][% END %] |
1267 |
[% END %][% END %][% END %] |