Fix for Bug 4278, canceling vendor add refreshes wrong
authorOwen Leonard <oleonard@myacpl.org>
Fri, 4 Jun 2010 16:49:19 +0000 (12:49 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 24 Jun 2010 02:50:22 +0000 (22:50 -0400)
Patch corrected to follow HDL's suggestion that link check
for existing vendor id and conditionally redirect based
on that.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl

index e07b303..83b8631 100644 (file)
@@ -145,7 +145,9 @@ if (f.company.value == "") {
                 <input type="hidden"  name="invoice_gst" value="0" />
             <!-- /TMPL_UNLESS -->
         </fieldset>
-        <fieldset class="action"><input type="button" value="Save" onclick="check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="id" -->">Cancel</a></fieldset>
+        <fieldset class="action"><input type="button" value="Save" onclick="check(this.form);" /> <!--TMPL_IF Name="id"-->
+        <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->"><!--TMPL_ELSE--><a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
+        <!--/TMPL_IF-->Cancel</a></fieldset>
         </div>
     </form>
 <!--TMPL_ELSE-->