Bug 16525 - Add cancel button when adding a new acq budget
Summary: Add cancel button when adding a new acq budget
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-16 01:07 UTC by Aleisha Amohia
Modified: 2017-06-14 22:14 UTC (History)
6 users (show)

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


Attachments
Bug 16525: Have cancel button when adding new aq budget (2.05 KB, patch)
2016-05-16 01:14 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 16525: Have cancel button when adding new aq budget (2.13 KB, patch)
2016-05-24 01:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16525: Have cancel button when adding new aq budget (2.23 KB, patch)
2016-05-25 12:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16525: Have cancel button when adding new aq budget (2.23 KB, patch)
2016-05-25 13:58 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 16525: Have cancel button when adding new aq budget (2.28 KB, patch)
2016-05-25 14:06 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 16525: Have cancel button when adding new aq budget (2.44 KB, patch)
2016-05-25 19:15 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2016-05-16 01:07:30 UTC

    
Comment 1 Aleisha Amohia 2016-05-16 01:14:41 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-05-17 12:09:40 UTC
This works fine, but the markup needs to be restructured:

<a href="[% IF ( budget_period_id) %]/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %][% ELSE %]/cgi-bin/koha/admin/aqbudgetperiods.pl[% END %]" class="cancel">Cancel</a>

I thought that this would have triggered a warning by the QA tools because of coding guideline 'HTML1:'

https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML

It's more verbose, but you have to do it this way:

[% IF ( budget_period_id) %]
    <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>
[% ELSE %]
    <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl" class="cancel">Cancel</a>
[% END %]
Comment 3 Aleisha Amohia 2016-05-24 01:24:40 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2016-05-25 12:43:12 UTC Comment hidden (obsolete)
Comment 5 Biblibre Sandboxes 2016-05-25 13:58:19 UTC
Patch tested with a sandbox, by Sabine Liebmann <Liebmann@dipf.de>
Comment 6 Biblibre Sandboxes 2016-05-25 13:58:40 UTC Comment hidden (obsolete)
Comment 7 PTFS Europe Sandboxes 2016-05-25 14:06:14 UTC
Patch tested with a sandbox, by Sabine Liebmann <Liebmann@dipf.de>
Comment 8 PTFS Europe Sandboxes 2016-05-25 14:06:35 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2016-05-25 19:15:03 UTC
Created attachment 51802 [details] [review]
Bug 16525: Have cancel button when adding new aq budget

At the moment you only see the cancel button on the form if editing an
existing budget. This patch adds a cancel button to the form which adds
a budget. Also changes the wording of the save button from 'Save
changes' to just 'Save' so it makes more sense when adding a new budget

To test:
1) Go to Admin -> Budgets -> New budget
2) Notice 'Save changes' button and no cancel
3) Apply patch and refresh page
4) Notice 'Save' button and 'cancel' link
5) Click 'cancel' - should be taken to Budgets administration page
6) Edit an existing budget
7) Click 'cancel' - should be taken to the funds page for that budget

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Sabine Liebmann <Liebmann@dipf.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Still an issue: If edit a budget fron aqbudgets.pl, then cancel, you get
aqbudgets.pl?budget_period_id=XX. But existed before this patch.
Comment 10 Brendan Gallagher 2016-05-31 11:47:30 UTC
Pushed to Master - Should be in the November 2016 Release.  Thanks!
Comment 11 Frédéric Demians 2016-06-15 07:31:45 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 12 Julian Maurice 2016-06-16 07:42:49 UTC
Patch pushed to 3.22.x, will be in 3.22.8