Project

General

Profile

0001-templates-mark-cancel-buttons-to-skip-HTML5-form-val.patch

Frédéric Péters, 17 Mar 2019 12:26 PM

Download (3.23 KB)

View differences:

Subject: [PATCH] templates: mark cancel buttons to skip HTML5 form validation
 (#31493)

 .../auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html     | 2 +-
 src/authentic2/templates/authentic2/accounts_delete.html        | 2 +-
 src/authentic2/templates/authentic2/login_password_form.html    | 2 +-
 .../templates/authentic2_auth_saml/login.html                   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
src/authentic2/auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html
8 8
{{ form.as_p }}
9 9
<button class="submit-button" name="{{ submit_name }}">{% trans "Log in" %}</button>
10 10
{% if cancel %}
11
<button class="cancel-button" name="cancel">{% trans 'Cancel' %}"</button>
11
<button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}"</button>
12 12
{% endif %}
13 13
</form>
14 14
</div>
src/authentic2/templates/authentic2/accounts_delete.html
18 18
  <p>{% trans "Delete my account and all my personal datas ?" %}</p>
19 19
  {{ form.as_p }}
20 20
  <button class="delete-button" name="submit">{% trans "Delete" %}</button>
21
  <button class="cancel-button" name="cancel">{% trans "Cancel" %}</button>
21
  <button class="cancel-button" name="cancel" formnovalidate>{% trans "Cancel" %}</button>
22 22
</form>
23 23
{% endblock %}
src/authentic2/templates/authentic2/login_password_form.html
5 5
{{ form.as_p }}
6 6
<button class="submit-button" name="{{ submit_name }}">{% trans "Log in" %}</button>
7 7
{% if cancel %}
8
<button class="cancel-button" name="cancel">{% trans 'Cancel' %}</button>
8
<button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}</button>
9 9
{% endif %}
10 10
</form>
11 11
</div>
src/authentic2_auth_saml/templates/authentic2_auth_saml/login.html
1 1
{% load i18n %}<form method="post">
2 2
    <button class="submit-button" name="{{ submit_name }}">{% trans "Login" %}</button>
3 3
    {% if cancel %}
4
        <button class="cancel-button" name="cancel">{% trans 'Cancel' %}</button>
4
        <button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}</button>
5 5
    {% endif %}
6 6
</form>
7 7

  
8
-