Bug 21513 - Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button
Summary: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P3 trivial
Assignee: Andreas Roussos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-07 17:56 UTC by Andreas Roussos
Modified: 2020-01-06 20:15 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
missing 'Cancel' button and duplicate 'Save' button (22.27 KB, image/png)
2018-10-07 17:56 UTC, Andreas Roussos
Details
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button (2.64 KB, patch)
2018-10-07 18:05 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button (2.69 KB, patch)
2018-10-07 21:31 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button (2.75 KB, patch)
2018-10-09 09:41 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Roussos 2018-10-07 17:56:32 UTC
Created attachment 80175 [details]
missing 'Cancel' button and duplicate 'Save' button

The bibliographic editor (cataloguing/addbiblio.pl) includes a 'Cancel'
button in its toolbar at the top. Actually, most pages in Koha which
allow you to add/edit something (e.g. MARC Framework, Authority types,
Authorised values, etc.) have a 'Cancel' button or link.

The authority editor (authorities/authorities.pl), however, does not
have a 'Cancel' button. Oddly, it has two 'Save' buttons, as per the
attached screenshot.

I propose to:
a) add a 'Cancel' button to the toolbar at the top of the page
b) remove the 'Save' button from the bottom of the page since the
   floating toolbar already has one.
Comment 1 Andreas Roussos 2018-10-07 18:05:28 UTC
Created attachment 80176 [details] [review]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).
Comment 2 Michal Denar 2018-10-07 21:31:55 UTC
Created attachment 80177 [details] [review]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 3 Martin Renvoize (ashimema) 2018-10-09 09:41:47 UTC
Created attachment 80254 [details] [review]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2018-10-09 09:43:06 UTC
Works as expected, no regressions found. Code is good and moves us towards a more unified experience.

Passing QA
Comment 5 Nick Clemens (kidclamp) 2018-10-17 19:25:29 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize (ashimema) 2018-10-26 13:04:45 UTC
Pushed to 18.05.x for 18.05.06
Comment 7 Fridolin Somers 2018-11-09 15:11:00 UTC
Very nice and useful.
Pushed to 17.11.x for 17.11.12