From 4dee6614bb9789f79883cd9a6cdd44fec314e32c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 1 Jun 2017 14:47:40 -0300 Subject: [PATCH] Bug 18789: Send Koha::Patron object to the templates In order to simplify and make uniform the code, the controller scripts send a Koha::Patron object to the templates instead of all attributes of a patron. That will make the code much more easier to maintain and will be less error-prone. The variable "patron" sent to the templates is supposed to represent the patron the librarian is editing the detail. In the members module and some scripts of the circulation module, the patron's detail are sent one by one to the template. That leads to frustration from developpers (making sure everything is passed from all scripts) and to regression (we got tone of bugs in the last year because of this way to do). With this patch set it will be easy access patron's detail, passing only 1 variable from the controllers. Test plan: Play with the patron and circulation module and make sur the detail of the patron you are editing/seeing info are correctly displayed. Signed-off-by: Kyle M Hall --- acqui/acqui-home.pl | 5 +- acqui/booksellers.pl | 3 +- admin/aqbudgets.pl | 3 +- circ/branchtransfers.pl | 5 +- circ/overdue.pl | 15 --- circ/transferstoreceive.pl | 8 +- circ/waitingreserves.pl | 6 +- .../prog/en/includes/borrower_debarments.inc | 4 +- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 66 ++++++------ .../en/includes/member-alt-address-style-de.inc | 22 ++-- .../en/includes/member-alt-address-style-fr.inc | 22 ++-- .../en/includes/member-alt-address-style-us.inc | 20 ++-- .../en/includes/member-alt-contact-style-de.inc | 18 ++-- .../en/includes/member-alt-contact-style-fr.inc | 18 ++-- .../en/includes/member-alt-contact-style-us.inc | 18 ++-- .../includes/member-display-address-style-de.inc | 20 ++-- .../includes/member-display-address-style-fr.inc | 22 ++-- .../includes/member-display-address-style-us.inc | 20 ++-- .../member-display-alt-address-style-de.inc | 20 ++-- .../member-display-alt-address-style-fr.inc | 26 ++--- .../member-display-alt-address-style-us.inc | 20 ++-- .../en/includes/member-main-address-style-de.inc | 18 ++-- .../en/includes/member-main-address-style-fr.inc | 18 ++-- .../en/includes/member-main-address-style-us.inc | 18 ++-- .../prog/en/includes/members-toolbar.inc | 42 ++++---- .../prog/en/modules/acqui/acqui-home.tt | 4 +- .../prog/en/modules/acqui/booksellers.tt | 6 +- .../prog/en/modules/admin/aqbudgets.tt | 8 +- .../prog/en/modules/circ/branchtransfers.tt | 6 +- .../prog/en/modules/circ/printslip.tt | 2 +- .../prog/en/modules/circ/transferstoreceive.tt | 14 +-- .../prog/en/modules/circ/waitingreserves.tt | 14 +-- .../prog/en/modules/members/boraccount.tt | 10 +- .../prog/en/modules/members/deletemem.tt | 14 +-- .../prog/en/modules/members/discharge.tt | 8 +- .../prog/en/modules/members/housebound.tt | 16 +-- .../prog/en/modules/members/mancredit.tt | 12 +-- .../prog/en/modules/members/maninvoice.tt | 12 +-- .../prog/en/modules/members/member-flags.tt | 10 +- .../prog/en/modules/members/member-password.tt | 14 +-- .../prog/en/modules/members/memberentrygen.tt | 2 +- .../prog/en/modules/members/moremember-print.tt | 20 ++-- .../prog/en/modules/members/moremember.tt | 120 ++++++++++----------- .../intranet-tmpl/prog/en/modules/members/pay.tt | 21 ++-- .../prog/en/modules/members/paycollect.tt | 26 ++--- .../prog/en/modules/members/printfeercpt.tt | 9 +- .../prog/en/modules/members/printinvoice.tt | 9 +- .../en/modules/members/purchase-suggestions.tt | 2 +- .../prog/en/modules/members/readingrec.tt | 4 +- .../prog/en/modules/members/routing-lists.tt | 4 +- .../prog/en/modules/reserve/request.tt | 50 ++++----- .../prog/en/modules/reviews/reviewswaiting.tt | 2 +- .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 12 ++- members/boraccount.pl | 4 +- members/deletemem.pl | 18 +--- members/discharge.pl | 26 +---- members/files.pl | 6 +- members/housebound.pl | 7 +- members/mancredit.pl | 4 +- members/maninvoice.pl | 5 +- members/member-flags.pl | 22 +--- members/member-password.pl | 24 +---- members/moremember.pl | 15 +-- members/notices.pl | 4 +- members/pay.pl | 13 +-- members/paycollect.pl | 5 +- members/printfeercpt.pl | 26 +---- members/printinvoice.pl | 25 +---- members/purchase-suggestions.pl | 8 +- members/readingrec.pl | 35 +++--- members/routing-lists.pl | 15 +-- members/statistics.pl | 11 +- members/summary-print.pl | 9 +- opac/opac-detail.pl | 2 +- opac/opac-reserve.pl | 4 - reserve/request.pl | 22 +--- reviews/reviewswaiting.pl | 3 +- tools/viewlog.pl | 10 +- 78 files changed, 486 insertions(+), 725 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 4da1eaf..2552909 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -73,10 +73,7 @@ foreach my $budget ( @{$budget_arr} ) { my $patron = Koha::Patrons->find( $budget->{budget_owner_id} ); if ( $patron ) { - # FIXME should pass the entire object into budget_owner - $budget->{budget_owner_firstname} = $patron->firstname; - $budget->{budget_owner_surname} = $patron->surname; - $budget->{budget_owner_borrowernumber} = $patron->borrowernumber; + $budget->{budget_owner} = $patron; } if ( !defined $budget->{budget_amount} ) { diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 8a35b04..97c8ac2 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -139,8 +139,7 @@ for my $vendor (@suppliers) { $basket->{$_} ||= 0; } if ( $patron ) { - $basket->{authorisedby_firstname} = $patron->firstname; - $basket->{authorisedby_surname} = $patron->surname; + $basket->{authorisedby} = $patron; } if ($basket->{basketgroupid}) { my $basketgroup = C4::Acquisition::GetBasketgroup($basket->{basketgroupid}); diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index f106a86..5aeb8b9 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -117,8 +117,7 @@ if ($op eq 'add_form') { exit; } $dropbox_disabled = BudgetHasChildren($budget_id); - my $patron = Koha::Patrons->find( $budget->{budget_owner_id} ); - $budget->{budget_owner_name} = ( $patron ? $patron->firstname . ' ' . $patron->surname : '' ); + $budget->{budget_owner} = Koha::Patrons->find( $budget->{budget_owner_id} ); } # build budget hierarchy diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 66fb59b..17c2b30 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -211,10 +211,7 @@ foreach my $code ( keys %$messages ) { $err{borrowernumber} = $messages->{'WasReturned'}; my $patron = Koha::Patrons->find( $messages->{'WasReturned'} ); if ( $patron ) { # Just in case... - $err{title} = $patron->title; - $err{firstname} = $patron->firstname; - $err{surname} = $patron->surname; - $err{cardnumber} = $patron->cardnumber; + $err{patron} = $patron; } } $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' ); diff --git a/circ/overdue.pl b/circ/overdue.pl index ff65712..fe3fdd0 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -300,27 +300,12 @@ if ($noreport) { push @overduedata, { patron => scalar Koha::Patrons->find( $data->{borrowernumber} ), duedate => $data->{date_due}, - borrowernumber => $data->{borrowernumber}, barcode => $data->{barcode}, - cardnumber => $data->{cardnumber}, itemnum => $data->{itemnumber}, issuedate => output_pref({ dt => dt_from_string( $data->{issuedate} ), dateonly => 1 }), - borrowertitle => $data->{borrowertitle}, - surname => $data->{surname}, - firstname => $data->{firstname}, - streetnumber => $data->{streetnumber}, - streettype => $data->{streettype}, - address => $data->{address}, - address2 => $data->{address2}, - city => $data->{city}, - zipcode => $data->{zipcode}, - country => $data->{country}, - phone => $data->{phone}, - email => $data->{email}, biblionumber => $data->{biblionumber}, title => $data->{title}, author => $data->{author}, - branchcode => $data->{branchcode}, homebranchcode => $data->{homebranchcode}, holdingbranchcode => $data->{holdingbranchcode}, itemcallnumber => $data->{itemcallnumber}, diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 0929ed3..c226cfe 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -115,13 +115,7 @@ while ( my $library = $libraries->next ) { # we check if we have a reserv for this transfer my $holds = $item->current_holds; if ( my $first_hold = $holds->next ) { - my $patron = Koha::Patrons->find( $first_hold->borrowernumber ); - # FIXME The full patron object should be passed to the template - $getransf{'borrowernum'} = $patron->borrowernumber; - $getransf{'borrowername'} = $patron->surname; - $getransf{'borrowerfirstname'} = $patron->firstname; - $getransf{'borrowermail'} = $patron->email if $patron->email; - $getransf{'borrowerphone'} = $patron->phone; + $getransf{patron} = Koha::Patrons->find( $first_hold->borrowernumber ); } push( @transferloop, \%getransf ); } diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 332c5dd..609e983 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -131,11 +131,7 @@ while ( my $hold = $holds->next ) { $getreserv{'dotransfer'} = 1; } - my $borEmail = $patron->first_valid_email_address; - - if ( $borEmail ) { - $getreserv{'borrowermail'} = $borEmail; - } + $getreserv{patron} = $patron; if ($today > $calcDate) { if ($cancelall) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc index 99fba0f..d4a2ab6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -68,7 +68,7 @@ [% d.created | $KohaDates %] [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] - + Remove @@ -81,7 +81,7 @@ [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]

Add manual restriction

- +
Add manual restriction diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index bdcc8af..2b29bfc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -1,5 +1,5 @@ [% USE Koha %] -[% IF ( borrowernumber ) %] +[% IF ( patron.borrowernumber ) %]
[% INCLUDE 'patron-title.inc' %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt index 82ba917..43911ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt @@ -1,12 +1,12 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Delete patron [% firstname %] [% surname %] +Koha › Delete patron [% patron.firstname %] [% patron.surname %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] - +
@@ -28,18 +28,18 @@ [% END %]
- [% ELSIF op == 'delete_confirm' and borrowernumber %] - [%# TODO add "patron does not exist" unless borrowernumber %] + [% ELSIF op == 'delete_confirm' and patron %] + [%# TODO add "patron does not exist" unless patron %]
-

Are you sure you want to delete the patron [% firstname %] [% surname %]? This cannot be undone.

+

Are you sure you want to delete the patron [% patron.firstname %] [% patron.surname %]? This cannot be undone.

- +
- +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt index 8e316cc..f352405 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt @@ -2,7 +2,7 @@ [% USE AuthorisedValues %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Patrons › [% UNLESS blocking_error %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %] +Koha › Patrons › [% UNLESS blocking_error %]Discharge for [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -12,7 +12,7 @@
@@ -32,12 +32,12 @@ [% UNLESS can_be_discharged %]

Cannot edit discharge: the patron has checked out items.

[% ELSE %] - [% IF has_reserves %] + [% IF patron.holds.count %]

Borrower has reserves: they will be canceled if the discharge is generated.

[% END %]
- +
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt index 49e965f..3bd6f9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt @@ -65,7 +65,7 @@

Manage housebound profile

- + [% IF ( housebound_profile ) %] [% ELSE %] @@ -196,7 +196,7 @@
+ href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber %]"> Cancel
@@ -213,7 +213,7 @@ [% ELSE %] [% END %] - +
Delivery details
    @@ -322,7 +322,7 @@
    + href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber %]"> Cancel
    @@ -379,7 +379,7 @@
@@ -405,15 +405,15 @@ - Edit - Delete + Edit + Delete [% END %] [% END %]
- Add a new delivery diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt index 65a61a5..0320fe6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt @@ -27,15 +27,15 @@ $(document).ready(function(){
- +
Manual credit
    @@ -49,7 +49,7 @@ $(document).ready(function(){
  1. Example: 5.00
-
Cancel
+
Cancel
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt index 8fc1f68..b2c16b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt @@ -35,10 +35,10 @@ $(document).ready(function(){
@@ -47,7 +47,7 @@ $(document).ready(function(){ ERROR an invalid itemnumber was entered, please hit back and try again [% END %] [% ELSE %] -
+
Manual invoice
    @@ -69,7 +69,7 @@ $(document).ready(function(){
  1. Example: 5.00
-
Cancel
+
Cancel
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt index 524c0a1..f15a092 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt @@ -1,7 +1,7 @@ [% USE Branches %] [% PROCESS 'permissions.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Patrons › Set permissions for [% surname %], [% firstname %] +Koha › Patrons › Set permissions for [% patron.surname %], [% patron.firstname %] [% INCLUDE 'doc-head-close.inc' %] @@ -112,7 +112,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'patron-search.inc' %] - +
@@ -123,9 +123,9 @@
- + -

Set permissions for [% surname %], [% firstname %]

+

Set permissions for [% patron.surname %], [% patron.firstname %]

    @@ -165,7 +165,7 @@
-
Cancel
+
Cancel
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index a80d89c..3fc925d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -1,7 +1,7 @@ [% USE Koha %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Patrons › [% IF ( newpassword ) %]Password updated [% ELSE %]Update password for [% surname %], [% firstname %][% END %] +Koha › Patrons › [% IF ( newpassword ) %]Password updated [% ELSE %]Update password for [% patron.surname %], [% patron.firstname %][% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 567b18d..8e29b97 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -3,13 +3,13 @@ [% USE KohaDates %] [% USE Price %] [% INCLUDE 'doc-head-open.inc' %] - Summary for [% firstname %] [% surname %] ([% cardnumber %]) + Summary for [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %]) [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'slip-print.inc' #printThenClose %]
-

Account summary: [% firstname %] [% surname %] ([% cardnumber %])

+

Account summary: [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])

    [% IF Koha.Preference( 'AddressFormat' ) %] @@ -17,15 +17,15 @@ [% ELSE %] [% INCLUDE 'member-display-address-style-us.inc' %] [% END %] -
  • [% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]
  • -
  • [% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]
  • - [% IF ( emailpro ) %] -
  • [% emailpro %]
  • +
  • [% IF ( patron.phone ) %][% patron.phone %][% ELSE %](no phone number on file)[% END %]
  • +
  • [% IF ( patron.email ) %][% patron.email %][% ELSE %](no primary email on file)[% END %]
  • + [% IF ( patron.emailpro ) %] +
  • [% patron.emailpro %]
  • [% END %] -
  • Registration date: [% dateenrolled | $KohaDates %]
  • -
  • Expiration date: [% dateexpiry | $KohaDates %]
  • -
  • Library: [% Branches.GetName( branchcode ) %]
  • -
  • Category: [% description %]
  • +
  • Registration date: [% patron.dateenrolled | $KohaDates %]
  • +
  • Expiration date: [% patron.dateexpiry | $KohaDates %]
  • +
  • Library: [% Branches.GetName( patron.branchcode ) %]
  • +
  • Category: [% patron.category.description %]
[% IF ( issues ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index d62cafe..3847adb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -27,7 +27,7 @@ /* Set some variable needed in circulation.js */ var interface = "[% interface %]"; var theme = "[% theme %]"; -var borrowernumber = "[% borrowernumber %]"; +var borrowernumber = "[% patron.borrowernumber %]"; var branchcode = "[% Branches.GetLoggedInBranchcode() %]"; var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]"; var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %] @@ -46,7 +46,7 @@ $(document).ready(function() { if ( $('#clubs-tab').length ) { $('#clubs-tab-link').on('click', function() { $('#clubs-tab').text(_("Loading...")); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]'); + $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber %]'); }); } @@ -174,7 +174,7 @@ function validate1(date) { [% END %]
- [% IF ( was_renewed ) %]
Patron's account has been renewed until [% dateexpiry | $KohaDates %]
[% END %] + [% IF ( was_renewed ) %]
Patron's account has been renewed until [% patron.dateexpiry | $KohaDates %]
[% END %] [% IF fines %]
@@ -205,18 +205,18 @@ function validate1(date) { View restrictions [% END %] - [% IF ( gonenoaddress ) %]
  • Patron's address is in doubt.
  • [% END %] + [% IF ( patron.gonenoaddress ) %]
  • Patron's address is in doubt.
  • [% END %] [% IF ( lost ) %]
  • Patron's card has been reported lost.
  • [% END %]
    [% END %]

    [% UNLESS ( I ) %] - [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])

    + [% patron.title | html %] [% patron.firstname | html %] [% END %] [% patron.surname | html %] ([% patron.cardnumber | html %])
    - [% IF ( othernames ) %]“[% othernames | html %]”[% END %] + [% IF ( patron.othernames ) %]“[% patron.othernames | html %]”[% END %]
    [% IF Koha.Preference( 'AddressFormat' ) %] @@ -228,17 +228,17 @@ function validate1(date) {
      - [% IF ( phone ) %]
    1. Primary phone: [% phone | html %]
    2. [% END %] - [% IF ( phonepro ) %]
    3. Secondary phone: [% phonepro | html %]
    4. [% END %] - [% IF ( mobile ) %]
    5. Other phone: [% mobile | html %]
    6. [% END %] - [% IF ( fax ) %]
    7. Fax: [% fax |html %]
    8. [% END %] - [% IF ( email ) %][% END %] - [% IF ( emailpro ) %][% END %] + [% IF ( patron.phone ) %]
    9. Primary phone: [% patron.phone | html %]
    10. [% END %] + [% IF ( patron.phonepro ) %]
    11. Secondary phone: [% patron.phonepro | html %]
    12. [% END %] + [% IF ( patron.mobile ) %]
    13. Other phone: [% patron.mobile | html %]
    14. [% END %] + [% IF ( patron.fax ) %]
    15. Fax: [% patron.fax |html %]
    16. [% END %] + [% IF ( patron.email ) %][% END %] + [% IF ( patron.emailpro ) %][% END %] [% UNLESS ( I ) %] - [% IF ( initials ) %]
    17. Initials: [% initials | html %]
    18. [% END %] - [% IF ( dateofbirth ) %]
    19. Date of birth:[% dateofbirth | $KohaDates %] ([% age %] years)
    20. [% END %] - [% IF ( sex ) %]
    21. Gender: - [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] + [% IF ( patron.initials ) %]
    22. Initials: [% patron.initials | html %]
    23. [% END %] + [% IF ( patron.dateofbirth ) %]
    24. Date of birth:[% patron.dateofbirth | $KohaDates %] ([% age %] years)
    25. [% END %] + [% IF ( patron.sex ) %]
    26. Gender: + [% IF ( patron.sex == 'F' ) %]Female[% ELSIF ( patron.sex == 'M' ) %]Male[% ELSE %][% patron.sex %][% END %]
    27. [% END %] [% END %] [% IF guarantees %] @@ -268,9 +268,9 @@ function validate1(date) {
    [% IF ( guarantor.borrowernumber ) %] - Edit + Edit [% ELSE %] - Edit + Edit [% END %]
    @@ -284,16 +284,16 @@ function validate1(date) {
    [% IF ( picture ) %] Manage patron image -
    To update the image for [% title | html %] [% surname | html %], select a new image file and click 'Upload.'
    Click the 'Delete' button to remove the current image. +
    To update the image for [% patron.title | html %] [% patron.surname | html %], select a new image file and click 'Upload.'
    Click the 'Delete' button to remove the current image. [% ELSE %] Upload patron image -
    [% title %] [% firstname | html %] [% surname | html %] does not currently have an image available. To import an image for [% title %] [% surname | html %], enter the name of an image file to upload. +
    [% patron.title %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title %] [% patron.surname | html %], enter the name of an image file to upload. [% END %]
    Only PNG, GIF, JPEG, XPM formats are supported.
    - - + +
    1. @@ -303,7 +303,7 @@ function validate1(date) { - [% IF ( picture ) %]Delete[% END %] + [% IF ( picture ) %]Delete[% END %]
    @@ -337,7 +337,7 @@ function validate1(date) { - + [% END %] [% IF ( ExtendedPatronAttributes ) %] @@ -366,7 +366,7 @@ function validate1(date) { [% END %] - + [% END %] [% END %] @@ -376,11 +376,11 @@ function validate1(date) {

    Patron messaging preferences

    [% INCLUDE 'messaging-preference-form.inc' %] [% IF ( SMSSendDriver ) %] -
    1. SMS number:[% SMSnumber %] + [% END %]
    - + [% END %] @@ -389,16 +389,16 @@ function validate1(date) {

    Library use

      -
    1. Card number: [% cardnumber %]
    2. -
    3. Borrowernumber: [% borrowernumber %]
    4. -
    5. Category: [% categoryname %] ([% categorycode %])
    6. -
    7. Registration date: [% dateenrolled | $KohaDates %]
    8. +
    9. Card number: [% patron.cardnumber %]
    10. +
    11. Borrowernumber: [% patron.borrowernumber %]
    12. +
    13. Category: [% patron.category.description %] ([% patron.categorycode %])
    14. +
    15. Registration date: [% patron.dateenrolled | $KohaDates %]
    16. Expiration date: [% IF ( was_renewed ) %] - [% dateexpiry | $KohaDates %] + [% patron.dateexpiry | $KohaDates %] [% ELSE %] - [% dateexpiry | $KohaDates %] + [% patron.dateexpiry | $KohaDates %] [% END %]
    17. @@ -419,18 +419,18 @@ function validate1(date) { [% END %] - [% IF ( sort1 ) %]
    18. Sort field 1:[% AuthorisedValues.GetByCode('Bsort1', sort1) |html %]
    19. [% END %] - [% IF ( sort2 ) %]
    20. Sort field 2:[% AuthorisedValues.GetByCode('Bsort2', sort2) |html %]
    21. [% END %] -
    22. Username: [% userid |html %]
    23. + [% IF ( patron.sort1 ) %]
    24. Sort field 1:[% AuthorisedValues.GetByCode('Bsort1', patron.sort1) |html %]
    25. [% END %] + [% IF ( patron.sort2 ) %]
    26. Sort field 2:[% AuthorisedValues.GetByCode('Bsort2', patron.sort2) |html %]
    27. [% END %] +
    28. Username: [% patron.userid |html %]
    29. Password: - [% IF ( password ) %] + [% IF ( patron.password ) %] ******* [% ELSE %] - Undefined + Undefined [% END %]
    30. - [% IF ( borrowernotes ) %]
    31. Circulation note: [% borrowernotes |html %]
    32. [% END %] - [% IF ( opacnote ) %]
    33. OPAC note:[% opacnote |html %]
    34. [% END %] + [% IF ( patron.borrowernotes ) %]
    35. Circulation note: [% patron.borrowernotes |html %]
    36. [% END %] + [% IF ( patron.opacnote ) %]
    37. OPAC note:[% patron.opacnote |html %]
    38. [% END %] [% IF Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 %] [% IF ( sync == 1 ) %]
    39. Activate sync: Yes
    40. @@ -442,9 +442,9 @@ function validate1(date) { [% END %] [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
    41. Check previous checkouts: - [% IF ( checkprevcheckout == 'yes' ) %] + [% IF ( patron.checkprevcheckout == 'yes' ) %] Yes - [% ELSIF ( checkprevcheckout == 'no' ) %] + [% ELSIF ( patron.checkprevcheckout == 'no' ) %] No [% ELSE %] Inherited @@ -454,13 +454,13 @@ function validate1(date) { [% IF Koha.Preference('TranslateNotices') %]
    42. Preferred language for notices: - [% translated_language %] + [% patron.translated_language %]
    43. [% END %]
    - +

    Alternate address

    @@ -472,28 +472,28 @@ function validate1(date) { [% END %]
      - [% IF ( B_phone ) %]
    1. Phone: [% B_phone |html %]
    2. [% END %] - [% IF ( B_email ) %][% END %] - [% IF ( contactnote ) %]
    3. Contact note: [% contactnote |html %]
    4. [% END %] + [% IF ( patron.B_phone ) %]
    5. Phone: [% patron.B_phone |html %]
    6. [% END %] + [% IF ( patron.B_email ) %][% END %] + [% IF ( patron.contactnote ) %]
    7. Contact note: [% patron.contactnote |html %]
    8. [% END %]
    - +

    Alternative contact

    -
    1. Surname: [% altcontactsurname | html %]
    2. -
    3. First name: [% altcontactfirstname | html %]
    4. -
    5. Address: [% altcontactaddress1 | html %]
    6. -
    7. Address 2: [% altcontactaddress2 | html %]
    8. -
    9. City: [% altcontactaddress3 | html %]
    10. - [% IF ( altcontactstate ) %]
    11. State: [% altcontactstate | html %]
    12. [% END %] -
    13. ZIP/Postal code: [% altcontactzipcode | html %]
    14. - [% IF ( altcontactcountry ) %]
    15. Country: [% altcontactcountry | html %]
    16. [% END %] - [% IF ( altcontactphone ) %]
    17. Phone: [% altcontactphone | html %]
    18. [% END %] +
      1. Surname: [% patron.altcontactsurname | html %]
      2. +
      3. First name: [% patron.altcontactfirstname | html %]
      4. +
      5. Address: [% patron.altcontactaddress1 | html %]
      6. +
      7. Address 2: [% patron.altcontactaddress2 | html %]
      8. +
      9. City: [% patron.altcontactaddress3 | html %]
      10. + [% IF ( patron.altcontactstate ) %]
      11. State: [% patron.altcontactstate | html %]
      12. [% END %] +
      13. ZIP/Postal code: [% patron.altcontactzipcode | html %]
      14. + [% IF ( patron.altcontactcountry ) %]
      15. Country: [% patron.altcontactcountry | html %]
      16. [% END %] + [% IF ( patron.altcontactphone ) %]
      17. Phone: [% patron.altcontactphone | html %]
      18. [% END %]
    - +
    @@ -600,7 +600,7 @@ function validate1(date) {
    - + [% IF Koha.Preference('AutoResumeSuspendedHolds') %] @@ -614,7 +614,7 @@ function validate1(date) {
    - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index c9a5a30..dec73b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -3,7 +3,7 @@ [% USE Branches %] [% USE Price %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Patrons › Pay Fines for [% borrower.firstname |html %] [% borrower.surname |html %] +Koha › Patrons › Pay Fines for [% patron.firstname |html %] [% patron.surname |html %] [% INCLUDE 'doc-head-close.inc' %]