Fixes #9437: Standardize form submission buttons and behavior when using enter key

This commit is contained in:
jeremystretch
2022-07-19 14:21:20 -04:00
parent 802d9d2b6e
commit 44586743ea
15 changed files with 57 additions and 139 deletions

View File

@@ -34,11 +34,11 @@
</div>
</div>
<div class="col col-md-12 my-3 text-end">
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
<button type="submit" name="_preview" class="btn btn-primary">Preview</button>
{% if '_preview' in request.POST and not form.errors %}
<button type="submit" name="_apply" class="btn btn-primary">Apply</button>
{% endif %}
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
</div>
</form>
</div>