@@ -, +, @@
---
.../prog/en/modules/tools/modborrowers.tt | 28 +++++++++++++----
tools/modborrowers.pl | 31 ++++++++++++++++++--
2 files changed, 49 insertions(+), 10 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
@@ -14,15 +14,13 @@
$("#borrowerst").dataTable($.extend(true, {}, dataTablesDefaults, {
"sDom": 't',
[% IF ( op == 'show_results' ) %]
- "aoColumns": [
- null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" }[% FOREACH attrh IN attributes_header %],null[% END %]
+ "aoColumnDefs": [
+ { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
],
[% ELSE %]
"aoColumnDefs": [
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
- ],
- "aoColumns": [
- null,null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" }[% FOREACH attrh IN attributes_header %],null[% END %]
+ { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
],
[% END %]
"bPaginate": false
@@ -232,8 +230,12 @@
First name |
Library |
Category |
- Registration date |
- Expiry date |
+ City |
+ State |
+ Zip code |
+ Country |
+ Registration date |
+ Expiry date |
[% FOREACH attrh IN attributes_header %]
[% attrh.attribute %] |
[% END %]
@@ -250,6 +252,10 @@
[% borrower.firstname %] |
[% borrower.branchname %] |
[% borrower.categorycode %] |
+ [% borrower.city %] |
+ [% borrower.state %] |
+ [% borrower.zipcode %] |
+ [% borrower.country %] |
[% borrower.dateenrolled | $KohaDates %] |
[% borrower.dateexpiry | $KohaDates %] |
[% FOREACH pa IN borrower.patron_attributes %]
@@ -288,6 +294,14 @@
Library:
[% CASE 'categorycode' %]
Category
+ [% CASE 'city' %]
+ City
+ [% CASE 'state' %]
+ State
+ [% CASE 'zipcode' %]
+ Zip code
+ [% CASE 'country' %]
+ Country
[% CASE 'sort1' %]
Sort 1:
[% CASE 'sort2' %]
--- a/tools/modborrowers.pl
+++ a/tools/modborrowers.pl
@@ -21,7 +21,8 @@
#
# Batch Edit Patrons
# Modification for patron's fields:
-# surname firstname branchcode categorycode sort1 sort2 dateenrolled dateexpiry borrowernotes
+# surname firstname branchcode categorycode city state zipcode country sort1
+# sort2 dateenrolled dateexpiry borrowernotes
# And for patron attributes.
use Modern::Perl;
@@ -169,7 +170,7 @@ if ( $op eq 'show' ) {
{
name => "firstname",
type => "text",
- mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
+ mandatory => ( grep /firstname/, @mandatoryFields ) ? 1 : 0,
}
,
{
@@ -187,6 +188,30 @@ if ( $op eq 'show' ) {
}
,
{
+ name => "city",
+ type => "text",
+ mandatory => ( grep /city/, @mandatoryFields ) ? 1 : 0,
+ }
+ ,
+ {
+ name => "state",
+ type => "text",
+ mandatory => ( grep /state/, @mandatoryFields ) ? 1 : 0,
+ }
+ ,
+ {
+ name => "zipcode",
+ type => "text",
+ mandatory => ( grep /zipcode/, @mandatoryFields ) ? 1 : 0,
+ }
+ ,
+ {
+ name => "country",
+ type => "text",
+ mandatory => ( grep /country/, @mandatoryFields ) ? 1 : 0,
+ }
+ ,
+ {
name => "sort1",
type => @sort1_option ? "select" : "text",
option => \@sort1_option,
@@ -230,7 +255,7 @@ if ( $op eq 'do' ) {
my @disabled = $input->param('disable_input');
my $infos;
- for my $field ( qw/surname firstname branchcode categorycode sort1 sort2 dateenrolled dateexpiry borrowernotes/ ) {
+ for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes/ ) {
my $value = $input->param($field);
$infos->{$field} = $value if $value;
$infos->{$field} = "" if grep { /^$field$/ } @disabled;
--