Bugzilla – Attachment 97270 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 edit template
Bug-24391-Remove-event-attributes-from-patron-club.patch (text/plain), 3.84 KB, created by
David Nind
on 2020-01-12 18:29:14 UTC
(
hide
)
Description:
Bug 24391: Remove event attributes from patron clubs edit template
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-01-12 18:29:14 UTC
Size:
3.84 KB
patch
obsolete
>From de20aa6e563741300d9f7f74d15c57679da12d42 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 edit > template > >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. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../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 15ed36d6a5..21ec946db8 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