Lines 25-37
Link Here
|
25 |
}); |
25 |
}); |
26 |
|
26 |
|
27 |
function clear_entry(node) { |
27 |
function clear_entry(node) { |
28 |
var original = node.parentNode.parentNode; |
28 |
var original = node.parentNode; |
29 |
$("input", original).attr('value', ''); |
29 |
$("input", original).attr('value', ''); |
30 |
$("select", original).attr('value', ''); |
30 |
$("select", original).attr('value', ''); |
31 |
} |
31 |
} |
32 |
|
32 |
|
33 |
function clone_entry(node) { |
33 |
function clone_entry(node) { |
34 |
var original = node.parentNode.parentNode; |
34 |
var original = node.parentNode; |
35 |
var clone = original.cloneNode(true); |
35 |
var clone = original.cloneNode(true); |
36 |
var newId = 50 + parseInt(Math.random() * 100000); |
36 |
var newId = 50 + parseInt(Math.random() * 100000); |
37 |
$("input", clone).attr('id', function() { |
37 |
$("input", clone).attr('id', function() { |
Lines 40-45
Link Here
|
40 |
$("input", clone).attr('name', function() { |
40 |
$("input", clone).attr('name', function() { |
41 |
return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); |
41 |
return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); |
42 |
}); |
42 |
}); |
|
|
43 |
$("label", clone).attr('for', function() { |
44 |
return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId); |
45 |
}); |
43 |
$("select", clone).attr('id', function() { |
46 |
$("select", clone).attr('id', function() { |
44 |
return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId); |
47 |
return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId); |
45 |
}); |
48 |
}); |
Lines 881-896
Link Here
|
881 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
884 |
<fieldset class="rows" id="memberentry_patron_attributes"> |
882 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
885 |
<input type="hidden" name="setting_extended_patron_attributes" value="1" /> |
883 |
<legend>Additional attributes and identifiers</legend> |
886 |
<legend>Additional attributes and identifiers</legend> |
884 |
<table> |
887 |
<ol> |
885 |
<tr> |
|
|
886 |
<th>Type</th> |
887 |
<th colspan="2">Value</th> |
888 |
</tr> |
889 |
<!-- TMPL_LOOP NAME='patron_attributes' --> |
888 |
<!-- TMPL_LOOP NAME='patron_attributes' --> |
890 |
<tr> |
889 |
<li> |
891 |
<td><!-- TMPL_VAR NAME="code" --> (<!-- TMPL_VAR NAME="description" -->) |
890 |
<label for="<!-- TMPL_VAR NAME="form_id" -->"> |
892 |
</td> |
891 |
<!-- TMPL_VAR NAME="code" -->:</label> |
893 |
<td> |
|
|
894 |
<input type="hidden" id="<!-- TMPL_VAR NAME="form_id" -->_code" name="<!-- TMPL_VAR NAME="form_id" -->_code" |
892 |
<input type="hidden" id="<!-- TMPL_VAR NAME="form_id" -->_code" name="<!-- TMPL_VAR NAME="form_id" -->_code" |
895 |
value="<!-- TMPL_VAR NAME="code" ESCAPE="HTML" -->" /> |
893 |
value="<!-- TMPL_VAR NAME="code" ESCAPE="HTML" -->" /> |
896 |
<!-- TMPL_IF NAME="use_dropdown" --> |
894 |
<!-- TMPL_IF NAME="use_dropdown" --> |
Lines 916-931
Link Here
|
916 |
(Password: <input type="password" maxlength="64" value="<!-- TMPL_VAR NAME="password" -->" |
914 |
(Password: <input type="password" maxlength="64" value="<!-- TMPL_VAR NAME="password" -->" |
917 |
id="<!-- TMPL_VAR NAME="form_id" -->_password" name="<!-- TMPL_VAR NAME="form_id" -->_password" />) |
915 |
id="<!-- TMPL_VAR NAME="form_id" -->_password" name="<!-- TMPL_VAR NAME="form_id" -->_password" />) |
918 |
<!-- /TMPL_IF --> |
916 |
<!-- /TMPL_IF --> |
919 |
</td> |
917 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
920 |
<td> |
|
|
921 |
<a href="#" onclick="clear_entry(this); return false;">Clear</a> |
922 |
<!-- TMPL_IF NAME="repeatable" --> |
918 |
<!-- TMPL_IF NAME="repeatable" --> |
923 |
<a href="#" onclick="clone_entry(this); return false;">New</a> |
919 |
| <a href="#" onclick="clone_entry(this); return false;">New</a> |
924 |
<!-- /TMPL_IF --> |
920 |
<!-- /TMPL_IF --> |
925 |
</td> |
921 |
<div class="hint"><!-- TMPL_VAR NAME="description" --></div> |
926 |
</tr> |
922 |
</li> |
927 |
<!-- /TMPL_LOOP --> |
923 |
<!-- /TMPL_LOOP --> |
928 |
</table> |
924 |
</ol> |
929 |
</fieldset> |
925 |
</fieldset> |
930 |
<!-- /TMPL_IF--><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> |
926 |
<!-- /TMPL_IF--><!-- /TMPL_IF --><!-- /TMPL_UNLESS --> |
931 |
|
927 |
|