From 9f9c1d5098ecee3926d394e409b6961e7c5e82bf Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 14 Feb 2020 16:25:21 +0000 Subject: [PATCH] Bug 6508: (follow-up) Remove dependency on jquery for check in templates Should work as before with the test plan from the second patch. But removes the added jQuery display control code in favor of checking if fines is set on template level. For several patrons with and without fines and with credits: - Check the Fines & Charges only display when there is something to see Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- .../prog/en/modules/members/moremember.tt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) 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 1523f80fa0..cfc2a0ab23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -702,9 +702,11 @@ [% relatives_issues_count | html %] Relatives' checkouts [% END %] -
  • - Fines & Charges ([% fines | $Price %]) -
  • + [% IF ( fines ) %] +
  • + Fines & Charges ([% fines | $Price %]) +
  • + [% END %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
  • [% IF ( holds_count ) %] @@ -756,13 +758,15 @@ [% INCLUDE "relatives-issues-table.inc" %] -
    - [% IF ( fines ) %] -

    Total due: [% fines | $Price %]

    - [% ELSE %] -

    No outstanding charges

    - [% END %] -
    + [% IF ( fines ) %] +
    + [% IF ( fines ) %] +

    Total due: [% fines | $Price %]

    + [% ELSE %] +

    No outstanding charges

    + [% END %] +
    + [% END %] [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
    @@ -891,10 +895,6 @@ columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] $(document).ready(function() { - $("#finestab").hide(); - [% IF fines %] - $("#finestab").show(); - [% END %] if ( $('#clubs-tab').length ) { $('#clubs-tab-link').on('click', function() { -- 2.39.5