From b75d982be00c351b2082d10dcf157917c3af70fc Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 26 Apr 2016 14:29:40 +0000 Subject: [PATCH] Bug 14497 [QA Followup] - Refactor code to have a single source for message Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../prog/en/includes/blocked-fines.inc | 22 +++++++++++++++++++ .../prog/en/modules/circ/circulation.tt | 11 +++------- .../prog/en/modules/members/moremember.tt | 19 +--------------- 3 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc new file mode 100644 index 0000000000..596c0c7a2e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -0,0 +1,22 @@ +[% USE Price %] +[% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] + +[% IF NoIssuesCharge && fines > NoIssuesCharge %] +
  • + Fees & Charges: + Patron has + Outstanding fees & charges + [% IF ( fines ) %] + of [% fines | $Price %] + [% END %] + . + + [% IF !Koha.Preference('AllowFineOverride') %] + Checkouts are BLOCKED because fine balance is OVER THE LIMIT. + [% END %] + + Make payment + or + Pay all fines
  • + +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 302824255b..b57847351e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -844,14 +844,9 @@ No patron matched [% message %] [% END %] [% IF ( charges ) %] -
  • - Fees & Charges: Patron has Outstanding fees & charges[% IF ( chargesamount ) %] of [% chargesamount %][% END %]. - [% IF ( charges_is_blocker ) %] - Checkouts are BLOCKED because fine balance is OVER THE LIMIT. - [% END %] - Make payment or - Pay all fines -
  • + [% INCLUDE 'blocked-fines.inc' + fines = chargesamount + %] [% END %] [% IF ( charges_guarantees ) %] 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 81a18c9126..a3398ea6d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -174,24 +174,7 @@ function validate1(date) { [% IF ( was_renewed ) %]
    Patron's account has been renewed until [% dateexpiry | $KohaDates %]
    [% END %] [% IF fines %] - [% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] - [% IF NoIssuesCharge && fines > NoIssuesCharge %] -
  • - Fees & Charges: - Patron has - Outstanding fees & charges - [% IF ( chargesamount ) %] - of [% chargesamount %] - [% END %] - . - [% IF !Koha.Preference('AllowFineOverride') %] - Checkouts are BLOCKED because fine balance is OVER THE LIMIT. - [% END %] - Make payment - or - Pay all fines
  • - - [% END %] + [% INCLUDE 'blocked-fines.inc' %] [% END %] [% IF ( flagged ) %] -- 2.39.5