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')}
|
||||
% else:
|
||||
% 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">
|
||||
</once-button>
|
||||
% else:
|
||||
<b-button tag="a" href="${form.cancel_url}">
|
||||
<b-button tag="a" href="${form.cancel_url or request.get_referrer()}">
|
||||
Cancel
|
||||
</b-button>
|
||||
% endif
|
||||
|
|
Loading…
Reference in a new issue