Lines 63-78
Link Here
|
63 |
} |
63 |
} |
64 |
|
64 |
|
65 |
function update_category_code(category_type) { |
65 |
function update_category_code(category_type) { |
66 |
var mytable = $("#attributes_table>tbody"); |
66 |
if ( $(category_type).is("select") ) { |
|
|
67 |
category_type = $("#categorycode").find("option:selected").attr("data-typename"); |
68 |
} |
69 |
var mytables = $(".attributes_table>tbody"); |
67 |
|
70 |
|
68 |
mytable.find("tr").each(function(){ |
71 |
mytables.find("tr").each(function(){ |
69 |
$(this).hide() |
72 |
$(this).hide() |
70 |
}); |
73 |
}); |
71 |
|
74 |
|
72 |
mytable.find("tr[data-category_type="+category_type+"]").each(function(){ |
75 |
mytables.find("tr[data-category_type="+category_type+"]").each(function(){ |
73 |
$(this).show(); |
76 |
$(this).show(); |
74 |
}); |
77 |
}); |
75 |
mytable.find("tr[data-category_type='']").each(function(){ |
78 |
mytables.find("tr[data-category_type='']").each(function(){ |
76 |
$(this).show(); |
79 |
$(this).show(); |
77 |
}); |
80 |
}); |
78 |
|
81 |
|
Lines 1192-1198
Link Here
|
1192 |
[% IF ( opduplicate ) %] |
1195 |
[% IF ( opduplicate ) %] |
1193 |
<textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" onclick="this.value=''">[% debarredcomment %]</textarea> |
1196 |
<textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" onclick="this.value=''">[% debarredcomment %]</textarea> |
1194 |
[% ELSE %] |
1197 |
[% ELSE %] |
1195 |
<textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" ">[% debarredcomment %]</textarea> |
1198 |
<textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" >[% debarredcomment %]</textarea> |
1196 |
[% END %] |
1199 |
[% END %] |
1197 |
</li> |
1200 |
</li> |
1198 |
|
1201 |
|
Lines 1207-1268
Link Here
|
1207 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
1210 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
1208 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
1211 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
1209 |
<legend>Additional attributes and identifiers</legend> |
1212 |
<legend>Additional attributes and identifiers</legend> |
1210 |
<table id="attributes_table"> |
1213 |
[% FOREACH pa_loo IN patron_attributes %] |
|
|
1214 |
[% IF pa_loo.class %] |
1215 |
<h4>[% pa_loo.class %]</h4> |
1216 |
<table id=aai_[% pa_loo.class %] class="attributes_table"> |
1217 |
[% ELSE %] |
1218 |
<table id="aai" class="attributes_table"> |
1219 |
[% END %] |
1211 |
<thead> |
1220 |
<thead> |
1212 |
<tr> |
1221 |
<tr> |
1213 |
<th>Class</th> |
|
|
1214 |
<th>Type</th> |
1222 |
<th>Type</th> |
1215 |
<th colspan="2">Value</th> |
1223 |
<th colspan="2">Value</th> |
1216 |
</tr> |
1224 |
</tr> |
1217 |
</thead> |
1225 |
</thead> |
1218 |
<tbody> |
1226 |
<tbody> |
1219 |
[% FOREACH patron_attribute IN patron_attributes %] |
1227 |
[% FOREACH patron_attribute IN pa_loo.items %] |
1220 |
<tr data-category_type="[% patron_attribute.category_type %]"> |
1228 |
<tr data-category_type="[% patron_attribute.category_type %]"> |
1221 |
<td>[% patron_attribute.class %]</td> |
1229 |
<td> |
1222 |
<td> |
1230 |
[% patron_attribute.code %] ([% patron_attribute.description %]) |
1223 |
[% patron_attribute.code %] ([% patron_attribute.description %]) |
1231 |
</td> |
1224 |
</td> |
1232 |
<td> |
1225 |
<td> |
1233 |
<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 %]" /> |
1234 |
[% IF ( patron_attribute.use_dropdown ) %] |
1227 |
[% IF ( patron_attribute.use_dropdown ) %] |
1235 |
<select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]"> |
1228 |
<select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]"> |
1236 |
<option value="" /> |
1229 |
<option value="" /> |
1237 |
[% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] |
1230 |
[% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] |
1238 |
[% IF ( auth_val_loo.selected ) %] |
1231 |
[% IF ( auth_val_loo.selected ) %] |
1239 |
<option value="[% auth_val_loo.authorised_value %]" selected="selected"> |
1232 |
<option value="[% auth_val_loo.authorised_value %]" selected="selected"> |
1240 |
[% auth_val_loo.lib %] |
1233 |
[% auth_val_loo.lib %] |
1241 |
</option> |
1234 |
</option> |
1242 |
[% ELSE %] |
|
|
1243 |
<option value="[% auth_val_loo.authorised_value %]" > |
1244 |
[% auth_val_loo.lib %] |
1245 |
</option> |
1246 |
[% END %] |
1247 |
[% END %] |
1248 |
</select> |
1249 |
[% ELSE %] |
1250 |
[% IF ( opduplicate ) %] |
1251 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1252 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" /> |
1235 |
[% ELSE %] |
1253 |
[% ELSE %] |
1236 |
<option value="[% auth_val_loo.authorised_value %]" > |
1254 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1237 |
[% auth_val_loo.lib %] |
1255 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" /> |
1238 |
</option> |
|
|
1239 |
[% END %] |
1256 |
[% END %] |
1240 |
[% END %] |
1257 |
[% END %] |
1241 |
</select> |
1258 |
[% IF ( patron_attribute.password_allowed ) %] |
1242 |
[% ELSE %] |
1259 |
(Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]" |
1243 |
[% IF ( opduplicate ) %] |
1260 |
id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />) |
1244 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1261 |
[% END %] |
1245 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" /> |
1262 |
</td> |
1246 |
[% ELSE %] |
1263 |
<td> |
1247 |
<input type="text" maxlength="64" value="[% patron_attribute.value %]" |
1264 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
1248 |
id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" /> |
1265 |
[% IF ( patron_attribute.repeatable ) %] |
1249 |
[% END %] |
1266 |
<a href="#" onclick="clone_entry(this); return false;">New</a> |
1250 |
[% END %] |
1267 |
[% END %] |
1251 |
[% IF ( patron_attribute.password_allowed ) %] |
1268 |
</td> |
1252 |
(Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]" |
1269 |
</tr> |
1253 |
id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />) |
1270 |
[% END %] |
1254 |
[% END %] |
|
|
1255 |
</td> |
1256 |
<td> |
1257 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
1258 |
[% IF ( patron_attribute.repeatable ) %] |
1259 |
<a href="#" onclick="clone_entry(this); return false;">New</a> |
1260 |
[% END %] |
1261 |
</td> |
1262 |
</tr> |
1263 |
[% END %] |
1264 |
</tbody> |
1271 |
</tbody> |
1265 |
</table> |
1272 |
</table> |
|
|
1273 |
[% END %] |
1266 |
</fieldset> |
1274 |
</fieldset> |
1267 |
[% END %][% END %][% END %] |
1275 |
[% END %][% END %][% END %] |
1268 |
|
1276 |
|