Fallback to referrer if form has no cancel button URL
This commit is contained in:
parent
8dcec94aec
commit
0877cfc3c9
|
@ -63,11 +63,11 @@
|
||||||
${h.link_to("Cancel", form.cancel_url, class_='ui-btn ui-corner-all')}
|
${h.link_to("Cancel", form.cancel_url, class_='ui-btn ui-corner-all')}
|
||||||
% else:
|
% else:
|
||||||
% if form.auto_disable_cancel:
|
% if form.auto_disable_cancel:
|
||||||
<once-button tag="a" href="${form.cancel_url}"
|
<once-button tag="a" href="${form.cancel_url or request.get_referrer()}"
|
||||||
text="Cancel">
|
text="Cancel">
|
||||||
</once-button>
|
</once-button>
|
||||||
% else:
|
% else:
|
||||||
<b-button tag="a" href="${form.cancel_url}">
|
<b-button tag="a" href="${form.cancel_url or request.get_referrer()}">
|
||||||
Cancel
|
Cancel
|
||||||
</b-button>
|
</b-button>
|
||||||
% endif
|
% endif
|
||||||
|
|
Loading…
Reference in a new issue