Bug 16384: Fix cancel link for 'Edit basket'
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Fri, 29 Apr 2016 00:53:43 +0000 (02:53 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 3 May 2016 15:39:38 +0000 (15:39 +0000)
When you edit the basket from the basket summary page,
saving the change brings you back to the basket summary
page, but cancelling brings you to the baskets page of
the vendor.

To test:
- Add a basket in acq
  - Test cancel link returns to baskets page of vendor
- Add a basket and save
- Edit this basket
  - Test cancel link now returns to basket summary page

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt

index 761660e..195022a 100644 (file)
         <fieldset class="action">
             <input type="hidden" name="op" value="add_validate" />
             <input type="submit" value="Save" />
-            <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
+            [% IF ( basketno ) %]
+                <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
+            [% ELSE %]
+                <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
+            [% END %]
         </fieldset>
     </form>
     [% END %]