@@ -, +, @@ templates - Test deletion of both club templates and clubs. Deletion confirmation dialogs should work as expected, both for OK and Cancel. - Test editing of a club template. Under "Club fields," the "Add new field" and "Delete field" links should work correctly. - Open a patron record for checkout. - Test enrolling and un-enrolling the patron. - Test the same process from the patron detail page. --- .../intranet-tmpl/prog/en/includes/strings.inc | 5 +- .../prog/en/modules/circ/circulation.tt | 1 + .../intranet-tmpl/prog/en/modules/clubs/clubs.tt | 18 ++++- .../prog/en/modules/clubs/patron-clubs-tab.tt | 38 +--------- .../prog/en/modules/clubs/patron-enroll.tt | 33 +-------- .../prog/en/modules/clubs/templates-add-modify.tt | 24 +++++-- .../prog/en/modules/members/moremember.tt | 1 + .../intranet-tmpl/prog/js/pages/circulation.js | 82 +++++++++++++++++++++- 8 files changed, 124 insertions(+), 78 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc @@ -1,5 +1,4 @@ - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1001,6 +1001,7 @@ No patron matched [% message | html %] [% FOREACH b IN relatives_borrowernumbers %] relatives_borrowernumbers.push("[% b | html %]"); [% END %] + var club_id = "[% club.id %]"; var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone."); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -88,7 +88,7 @@ Edit - + Delete [% END %] @@ -196,7 +196,7 @@
  • - + Delete
  • @@ -248,6 +248,20 @@ } )); }); + $(".delete_template").on("click", function(e){ + e.preventDefault(); + var name = $(this).data("name"); + var id = $(this).data("id"); + ConfirmDeleteTemplate( id, name, $(this) ); + }); + + $(".delete_club").on("click", function(e){ + e.preventDefault(); + var name = $(this).data("name"); + var id = $(this).data("id"); + ConfirmDeleteClub( id, name, $(this) ); + }); + function ConfirmDeleteTemplate( id, name, a ) { if ( confirm( _("Are you sure you want to delete the club template %s? This will delete all clubs using this template and cancel patron enrollments" ).format(name) ) ) { $.ajax({ --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt @@ -21,7 +21,7 @@ [% e.date_enrolled | $KohaDates %] [% IF CAN_user_clubs_enroll %] - @@ -33,7 +33,6 @@ [% END %] [% IF clubs %] -

    Clubs not enrolled in

    @@ -52,7 +51,7 @@ [% IF CAN_user_clubs_enroll %] @@ -62,36 +61,3 @@
    [% c.description | html %] -
    [% END %] - -[% IF CAN_user_clubs_enroll %] - -[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt @@ -28,39 +28,10 @@ [% END %]
  • - Finish enrollment - Cancel + Finish enrollment + Cancel
  • - - --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt @@ -1,5 +1,6 @@ [% USE Branches %] [% USE AuthorisedValues %] +[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Patron clubs › [% IF club_template %] @@ -9,7 +10,7 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] -