@@ -, +, @@
modification template
- Apply the patch and go to Tools -> Batch patron modification.
- Submit a batch of patrons for modification.
- Confirm that the checkbox next to any required field is disabled.
- Select a date in the registration date and expiry date fields. Confirm
that the "Clear" link next to each empties the correct field.
- Click "New" next to a patron attibute. A copy of the patron attribute
line should be created.
- Click "Delete" next to a cloned patron attribute. The correct line
should be removed.
---
.../prog/en/modules/tools/modborrowers.tt | 25 ++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
@@ -58,7 +58,20 @@
$('select[name="patron_attributes"]').change();
- } );
+ $(".clear-date").on("click",function(e){
+ e.preventDefault();
+ var fieldID = this.id.replace("clear-date-","");
+ $("#" + fieldID).val("");
+ });
+ $("#cataloguing_additem_newitem").on("click",".add_attributes",function(e){
+ e.preventDefault();
+ add_attributes();
+ });
+ $("#cataloguing_additem_newitem").on("click",".del_attributes",function(e){
+ e.preventDefault();
+ del_attributes(this);
+ });
+ });
function updateAttrValues (select_attr) {
var attr_code = $(select_attr).val();
@@ -84,8 +97,8 @@
function add_attributes() {
var li_node = $("li.attributes:last");
var li_clone = $(li_node).clone();
- if ( $(li_clone).find("a.delete").length == 0 ) {
- $(li_clone).append(' Delete');
+ if ( $(li_clone).find("a.del_attributes").length == 0 ) {
+ $(li_clone).append(' Delete');
}
$(li_clone).find('select[name="patron_attributes"]').change(function() {
updateAttrValues(this);
@@ -335,7 +348,7 @@
[% END %]
[% IF field.mandatory %]
-
+
[% ELSE %]
[% END %]
@@ -355,7 +368,7 @@
[% END %]
[% IF ( field.type == 'date' ) %]
- Clear
+ Clear
[% END %]
[% IF field.mandatory %]
Required fields cannot be cleared
@@ -373,7 +386,7 @@
- New
+ New
[% END %]
--