From b87b1eee8925dbe8762fc534fb1699f8aa87a32f 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 --- .../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 ced24808dc..5a25050242 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -699,9 +699,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 ) %] @@ -753,13 +755,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 ) %]
    @@ -888,10 +892,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.11.0