Bugzilla – Attachment 97128 Details for
Bug 24391
Remove event attributes from patron clubs edit template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24391: Remove event attributes from patron clubs templates
Bug-24391-Remove-event-attributes-from-patron-club.patch (text/plain), 3.79 KB, created by
Owen Leonard
on 2020-01-09 17:54:47 UTC
(
hide
)
Description:
Bug 24391: Remove event attributes from patron clubs templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-01-09 17:54:47 UTC
Size:
3.79 KB
patch
obsolete
>From bbb64b749be1968111352fa757b0a881e9b6cd2d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 9 Jan 2020 17:45:47 +0000 >Subject: [PATCH] Bug 24391: Remove event attributes from patron clubs > templates > >This patch removes "onclick" attributes from the template for adding and >editing patron club templates. > >To test, apply the patch and go to Tools -> Patron clubs -> New club >template. > >Test the process of adding and deleting both club and enrollment fields. >Test during the template add process and when editing an existing >template. >--- > .../prog/en/modules/clubs/templates-add-modify.tt | 34 +++++++++++++++++++--- > 1 file changed, 30 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >index 15ed36d6a59..21ec946db8b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >+++ b/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' %] > <title>Koha › Tools › Patron clubs › > [% IF club_template %] >@@ -124,7 +125,7 @@ > [% END %] > </div> > <fieldset class="action"> >- <a href="#" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;"> >+ <a href="#" class="add_club_field"> > <i class="fa fa-plus"></i> Add new field > </a> > </fieldset> >@@ -169,7 +170,7 @@ > [% END %] > </div> > <fieldset class="action"> >- <a href="#" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;"> >+ <a href="#" class="add_enrollment_field"> > <i class="fa fa-plus"></i> Add new field > </a> > </fieldset> >@@ -209,7 +210,7 @@ > </select> > </li> > </ol> >- <fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset> >+ <fieldset class="action"><a href="#" class="delete_club_field"><i class="fa fa-trash"></i> Delete field</a></fieldset> > <hr/> > </div> > >@@ -236,7 +237,32 @@ > </select> > </li> > </ol> >- <fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset> >+ <fieldset class="action"><a href="#" class="delete_enrollment_field"><i class="fa fa-trash"></i> Delete field</a></fieldset> > </div> > >+ >+[% MACRO jsinclude BLOCK %] >+ <script> >+ $("body").on("click", ".add_club_field", function(e){ >+ e.preventDefault(); >+ $("#new-field-template").clone().attr("id","").show().appendTo("#club-template-fields"); >+ }); >+ >+ $("body").on("click", ".delete_club_field", function(e){ >+ e.preventDefault(); >+ $(this).parent().parent().remove(); >+ }); >+ >+ $("body").on("click", ".delete_enrollment_field", function(e){ >+ e.preventDefault(); >+ $(this).parent().parent().remove(); >+ }); >+ >+ $("body").on("click", ".add_enrollment_field", function(e){ >+ e.preventDefault(); >+ $('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24391
:
97128
|
97140
|
97270
|
97373