Summary: | Add cancel button when adding a new acq budget | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Acquisitions | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | brendan, f.demians, julian.maurice, sandboxes, sandboxes |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 16525: Have cancel button when adding new aq budget
Bug 16525: Have cancel button when adding new aq budget [SIGNED-OFF] Bug 16525: Have cancel button when adding new aq budget Bug 16525: Have cancel button when adding new aq budget Bug 16525: Have cancel button when adding new aq budget Bug 16525: Have cancel button when adding new aq budget |
Description
Aleisha Amohia
2016-05-16 01:07:30 UTC
Created attachment 51507 [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 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 %] Created attachment 51725 [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 Created attachment 51772 [details] [review] [SIGNED-OFF] 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> Patch tested with a sandbox, by Sabine Liebmann <Liebmann@dipf.de> Created attachment 51784 [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> Patch tested with a sandbox, by Sabine Liebmann <Liebmann@dipf.de> Created attachment 51786 [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: Sabine Liebmann <Liebmann@dipf.de> 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. Pushed to Master - Should be in the November 2016 Release. Thanks! Pushed in 16.05. Will be in 16.05.01. Patch pushed to 3.22.x, will be in 3.22.8 |