[Bug 18530] New: Remove event attributes from patron clubs templates
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Bug ID: 18530 Summary: Remove event attributes from patron clubs templates Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org The patron clubs templates add a lot of instances of "onclick," in violation of coding guidelines. https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9:_Avoid_the_use_of... They should be removed in favor of defining events in JavaScript instead of markup. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12461 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12461 [Bug 12461] Add patron clubs feature -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Bug 18530 depends on bug 12461, which changed state. Bug 12461 Summary: Add patron clubs feature https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12461 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82093 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82093&action=edit Bug 18530: Remove event attributes from patron clubs templates This patch removes event attributes like "onclick" from patron clubs templates in favor of putting these event handlers in the JavaScript. To test, apply the patch and go to Tools -> Patron clubs. - Test deletion of both club templates and clubs. Deletion confirmation dialogs should work as expected, both for OK and Cancel. - Open a patron record for checkout. - Test enrolling and un-enrolling the patron. - Test the same process from the patron detail page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82093|1 |0 is patch| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82093|0 |1 is obsolete| | Attachment #82093|0 |1 is patch| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82100&action=edit Bug 18530: Remove event attributes from patron clubs templates This patch removes event attributes like "onclick" from patron clubs templates in favor of putting these event handlers in the JavaScript. To test, apply the patch and go to Tools -> Patron clubs. - 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82100|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82332&action=edit Bug 18530: Remove event attributes from patron clubs templates This patch removes event attributes like "onclick" from patron clubs templates in favor of putting these event handlers in the JavaScript. To test, apply the patch and go to Tools -> Patron clubs. - 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Candice Hope <candiceh@payson.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |candiceh@payson.org --- Comment #4 from Candice Hope <candiceh@payson.org> --- I was testing this patch in the sandboxes, and while editing the club template, it would not allow me to save a new enrollment field without an error. Everything else tested well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Candice Hope from comment #4)
while editing the club template, it would not allow me to save a new enrollment field without an error.
I don't see this error when I test. Can you describe the steps to reproduce it? What is the error? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 --- Comment #6 from Candice Hope <candiceh@payson.org> --- I just made a new sandbox to test it again, and the same error results. What I did: 1. Create a new club template. 2. Create a new club. 3. Edit the club template. 4. Add a club field. 5. Add an enrollment field. 6. Error DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: '' for column 'id' at row 1 at /kohadevbox/koha/Koha/Object.pm line 125 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Candice Hope from comment #6)
DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
I don't think that error is related to my patch, so I'm going to set this back to "Needs signoff." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- you missed line 128 or so in koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt There is still an onclick. Also, there seems to be a problem with using every authorized value in the drop down. I chose the birthday reason one, and it didn't say, in either the club or the other field. Though, I think that might be beyond the scope of this bug, and yet fixing it first would make testing this bug easier. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Owen Leonard from comment #7)
(In reply to Candice Hope from comment #6)
DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
I don't think that error is related to my patch, so I'm going to set this back to "Needs signoff."
I concur, as I did not experience errors like this. Perhaps they got logged and I didn't read them? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82332|0 |1 is obsolete| | --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 83771 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83771&action=edit Bug 18530: Remove event attributes from patron clubs templates This patch removes event attributes like "onclick" from patron clubs templates in favor of putting these event handlers in the JavaScript. To test, apply the patch and go to Tools -> Patron clubs. - 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 --- Comment #11 from Owen Leonard <oleonard@myacpl.org> --- (In reply to M. Tompsett from comment #8)
I chose the birthday reason one, and it didn't say, in either the club or the other field.
I don't understand this description, but if the problem exists in master please file a separate bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |pierre-marc.thibault@inlibr | |o.com --- Comment #12 from Pierre-Marc Thibault <pierre-marc.thibault@inlibro.com> --- I noticed there is no longer an onclick attribute for "Add new field" and "Delete field" for enrollment fields, but it's still there for club fields when I edit a club template. I put the QA Failed status because the patch doesn't seem to be complete. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24391 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24391 [Bug 24391] Remove event attributes from patron clubs templates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83771|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24393 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24393 [Bug 24393] Remove event attributes from patron clubs list template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18530 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|24391 | Depends on| |24391 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24391 [Bug 24391] Remove event attributes from patron clubs edit template -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org