Fix for Bug 4278, canceling vendor add refreshes wrong

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>
This commit is contained in:
Owen Leonard 2010-06-04 12:49:19 -04:00 committed by Galen Charlton
parent 3bae1c1dca
commit 4d8863bbdb

View 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-->