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 categorycode %] |
28 |
update_category_code( "[% categorycode %]" ); |
29 |
[% ELSE %] |
30 |
if ( $("#categorycode").length > 0 ){ |
31 |
var category_code = $("#categorycode").find("option:selected").val(); |
32 |
update_category_code( category_code ); |
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_code) { |
66 |
if ( $(category_code).is("select") ) { |
67 |
category_code = $("#categorycode").find("option:selected").val(); |
68 |
} |
69 |
var mytables = $(".attributes_table>tbody"); |
70 |
|
71 |
mytables.find("tr").each(function(){ |
72 |
$(this).hide() |
73 |
}); |
74 |
|
75 |
mytables.find("tr[data-category_code="+category_code+"]").each(function(){ |
76 |
$(this).show(); |
77 |
}); |
78 |
mytables.find("tr[data-category_code='']").each(function(){ |
79 |
$(this).show(); |
80 |
}); |
81 |
|
82 |
} |
83 |
|
54 |
var MSG_SEPARATOR = _("Separator must be / in field "); |
84 |
var MSG_SEPARATOR = _("Separator must be / in field "); |
55 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field "); |
85 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field "); |
56 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); |
86 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field "); |
Lines 999-1023
Link Here
|
999 |
[% END %] |
1029 |
[% END %] |
1000 |
<li> |
1030 |
<li> |
1001 |
<label for="categorycode">Category: </label> |
1031 |
<label for="categorycode">Category: </label> |
1002 |
<select id="categorycode" name="categorycode"> |
1032 |
<select id="categorycode" name="categorycode" onchange="update_category_code(this);"> |
1003 |
[% FOREACH typeloo IN typeloop %] |
1033 |
[% FOREACH typeloo IN typeloop %] |
1004 |
[% FOREACH categoryloo IN typeloo.categoryloop %] |
1034 |
[% FOREACH categoryloo IN typeloo.categoryloop %] |
1005 |
[% IF ( loop.first ) %] |
1035 |
[% IF ( loop.first ) %] |
1006 |
[% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %] |
1036 |
[% IF ( typeloo.typename_C ) %]<optgroup label="Child" value="C">[% END %] |
1007 |
[% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %] |
1037 |
[% IF ( typeloo.typename_A ) %]<optgroup label="Adult" value="A">[% END %] |
1008 |
[% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %] |
1038 |
[% IF ( typeloo.typename_S ) %]<optgroup label="Staff" value="S">[% END %] |
1009 |
[% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %] |
1039 |
[% IF ( typeloo.typename_I ) %]<optgroup label="Organization" value="I">[% END %] |
1010 |
[% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %] |
1040 |
[% IF ( typeloo.typename_P ) %]<optgroup label="Professional" value="P">[% END %] |
1011 |
[% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %] |
1041 |
[% IF ( typeloo.typename_X ) %]<optgroup label="Statistical" value="X">[% END %] |
1012 |
[% END %] |
1042 |
[% END %] |
1013 |
[% IF ( categoryloo.categorycodeselected ) %] |
1043 |
[% IF ( categoryloo.categorycodeselected ) %] |
1014 |
<option value="[% categoryloo.categorycode %]" selected="selected">[% categoryloo.categoryname %]</option> |
1044 |
<option value="[% categoryloo.categorycode %]" selected="selected" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option> |
1015 |
[% ELSE %] |
1045 |
[% ELSE %] |
1016 |
<option value="[% categoryloo.categorycode %]">[% categoryloo.categoryname %]</option> |
1046 |
<option value="[% categoryloo.categorycode %]" data-typename="[% typeloo.typename %]">[% categoryloo.categoryname %]</option> |
1017 |
[% END %] |
1047 |
[% END %] |
1018 |
[% IF ( loop.last ) %] |
1048 |
[% IF ( loop.last ) %] |
1019 |
</optgroup> |
1049 |
</optgroup> |
1020 |
[% END %] |
1050 |
[% END %] |
1021 |
[% END %] |
1051 |
[% END %] |
1022 |
[% END %] |
1052 |
[% END %] |
1023 |
</select> |
1053 |
</select> |
Lines 1352-1406
Link Here
|
1352 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
1382 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
1353 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
1383 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
1354 |
<legend>Additional attributes and identifiers</legend> |
1384 |
<legend>Additional attributes and identifiers</legend> |
1355 |
<table> |
1385 |
[% FOREACH pa_loo IN patron_attributes %] |
1356 |
<tr> |
1386 |
[% IF pa_loo.class %] |
1357 |
<th>Type</th> |
1387 |
<h4>[% pa_loo.class %]</h4> |
1358 |
<th colspan="2">Value</th> |
1388 |
<table id=aai_[% pa_loo.class %] class="attributes_table"> |
1359 |
</tr> |
1389 |
[% ELSE %] |
1360 |
[% FOREACH patron_attribute IN patron_attributes %] |
1390 |
<table id="aai" class="attributes_table"> |
1361 |
<tr> |
1391 |
[% END %] |
1362 |
<td>[% patron_attribute.code %] ([% patron_attribute.description %]) |
1392 |
<thead> |
1363 |
</td> |
1393 |
<tr> |
1364 |
<td> |
1394 |
<th>Type</th> |
1365 |
<input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> |
1395 |
<th colspan="2">Value</th> |
1366 |
[% IF ( patron_attribute.use_dropdown ) %] |
1396 |
</tr> |
1367 |
<select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]"> |
1397 |
</thead> |
1368 |
<option value="" /> |
1398 |
<tbody> |
1369 |
[% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] |
1399 |
[% FOREACH patron_attribute IN pa_loo.items %] |
1370 |
[% IF ( auth_val_loo.selected ) %] |
1400 |
<tr data-category_code="[% patron_attribute.category_code %]"> |
1371 |
<option value="[% auth_val_loo.authorised_value %]" selected="selected"> |
1401 |
<td> |
1372 |
[% auth_val_loo.lib %] |
1402 |
[% patron_attribute.code %] ([% patron_attribute.description %]) |
1373 |
</option> |
1403 |
</td> |
|
|
1404 |
<td> |
1405 |
<input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" /> |
1406 |
[% IF ( patron_attribute.use_dropdown ) %] |
1407 |
<select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]"> |
1408 |
<option value="" /> |
1409 |
[% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] |
1410 |
[% IF ( auth_val_loo.selected ) %] |
1411 |
<option value="[% auth_val_loo.authorised_value %]" selected="selected"> |
1412 |
[% auth_val_loo.lib %] |
1413 |
</option> |
1414 |
[% ELSE %] |
1415 |
<option value="[% auth_val_loo.authorised_value %]" > |
1416 |
[% auth_val_loo.lib %] |
1417 |
</option> |
1418 |
[% END %] |
1419 |
[% END %] |
1420 |
</select> |
1421 |
[% ELSE %] |
1422 |
[% IF ( opduplicate ) %] |
1423 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1424 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" /> |
1374 |
[% ELSE %] |
1425 |
[% ELSE %] |
1375 |
<option value="[% auth_val_loo.authorised_value %]" > |
1426 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1376 |
[% auth_val_loo.lib %] |
1427 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" /> |
1377 |
</option> |
|
|
1378 |
[% END %] |
1428 |
[% END %] |
1379 |
[% END %] |
1429 |
[% END %] |
1380 |
</select> |
1430 |
[% IF ( patron_attribute.password_allowed ) %] |
1381 |
[% ELSE %] |
1431 |
(Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]" |
1382 |
[% IF ( opduplicate ) %] |
1432 |
id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />) |
1383 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1433 |
[% END %] |
1384 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" /> |
1434 |
</td> |
1385 |
[% ELSE %] |
1435 |
<td> |
1386 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1436 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
1387 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" /> |
1437 |
[% IF ( patron_attribute.repeatable ) %] |
1388 |
[% END %] |
1438 |
<a href="#" onclick="clone_entry(this); return false;">New</a> |
1389 |
[% END %] |
1439 |
[% END %] |
1390 |
[% IF ( patron_attribute.password_allowed ) %] |
1440 |
</td> |
1391 |
(Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]" |
1441 |
</tr> |
1392 |
id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />) |
1442 |
[% END %] |
1393 |
[% END %] |
1443 |
</tbody> |
1394 |
</td> |
1444 |
</table> |
1395 |
<td> |
1445 |
[% END %] |
1396 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
|
|
1397 |
[% IF ( patron_attribute.repeatable ) %] |
1398 |
<a href="#" onclick="clone_entry(this); return false;">New</a> |
1399 |
[% END %] |
1400 |
</td> |
1401 |
</tr> |
1402 |
[% END %] |
1403 |
</table> |
1404 |
</fieldset> |
1446 |
</fieldset> |
1405 |
[% END %][% END %][% END %] |
1447 |
[% END %][% END %][% END %] |
1406 |
|
1448 |
|