From 6bff995bdbf30481a2b2c034a0dab91ca30e07db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?=
Date: Wed, 21 Mar 2018 17:51:12 +0100
Subject: [PATCH] misc: switch form buttons to
-
+
diff --git a/src/authentic2/auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html b/src/authentic2/auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html
index 069c9d4a..025f42db 100644
--- a/src/authentic2/auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html
+++ b/src/authentic2/auth2_auth/auth2_ssl/templates/auth/login_form_ssl.html
@@ -6,9 +6,9 @@
diff --git a/src/authentic2/auth2_auth/auth2_ssl/templates/ssl/profile.html b/src/authentic2/auth2_auth/auth2_ssl/templates/ssl/profile.html
index fe7096e7..2608f69a 100644
--- a/src/authentic2/auth2_auth/auth2_ssl/templates/ssl/profile.html
+++ b/src/authentic2/auth2_auth/auth2_ssl/templates/ssl/profile.html
@@ -18,7 +18,7 @@
{% endfor %}
-
+
{% endfor %}
@@ -27,7 +27,7 @@
diff --git a/src/authentic2/manager/static/authentic2/manager/css/style.css b/src/authentic2/manager/static/authentic2/manager/css/style.css
index 17c78315..e66b6093 100644
--- a/src/authentic2/manager/static/authentic2/manager/css/style.css
+++ b/src/authentic2/manager/static/authentic2/manager/css/style.css
@@ -86,7 +86,7 @@ table.users tbody tr td:nth-child(2):hover {
width: 30%;
}
-.other_actions input[type=submit] {
+.other_actions button {
display: block;
margin: 5px;
width: 100%;
@@ -112,7 +112,7 @@ li#users a:hover { background-image: url(icon-user-hover.png); }
max-width: 50%;
}
-.warning-box input[type=submit] {
+.warning-box button {
float: right;
}
diff --git a/src/authentic2/manager/static/authentic2/manager/js/manager.js b/src/authentic2/manager/static/authentic2/manager/js/manager.js
index ffc9e387..808aa825 100644
--- a/src/authentic2/manager/static/authentic2/manager/js/manager.js
+++ b/src/authentic2/manager/static/authentic2/manager/js/manager.js
@@ -139,7 +139,7 @@
return false;
});
/* confirmation on submit buttons */
- $(document).on('click', 'input[type=submit]', function (e) {
+ $(document).on('click', 'button', function (e) {
if ($(e.target).data('confirm')) {
if (! confirm($(e.target).data('confirm'))) {
e.preventDefault();
@@ -153,7 +153,7 @@
window.location.href = $(e.target).data('url');
}
}
- })
+ });
$(document).on('change', '#id_generate_password', function (e) {
if ($(e.target).is(':checked')) {
$('#id_send_mail').prop('disabled', true);
@@ -168,7 +168,7 @@
$('#id_password2').prop('disabled', false);
}
});
- $(document).on('click.manager', 'table tr[data-url][rel=popup], button[rel=popup]', displayPopup);
+ $(document).on('click.manager', 'table tr[data-url][rel=popup]', displayPopup);
$(document).on('click.manager', 'table tr[data-url]:not([rel=popup])', function (e) {
window.location.href = $(this).data('url');
});
diff --git a/src/authentic2/manager/templates/authentic2/manager/form.html b/src/authentic2/manager/templates/authentic2/manager/form.html
index 812c56fd..83f7cda5 100644
--- a/src/authentic2/manager/templates/authentic2/manager/form.html
+++ b/src/authentic2/manager/templates/authentic2/manager/form.html
@@ -74,12 +74,12 @@
{% if other_actions %}
{% trans "Actions" %}
{% for action in other_actions %}
-
+ >{{ action.title }}
{% endfor %}
{% endif %}
{% endblock %}
diff --git a/src/authentic2/manager/templates/authentic2/manager/user_detail.html b/src/authentic2/manager/templates/authentic2/manager/user_detail.html
index fe1fa426..70e43ecd 100644
--- a/src/authentic2/manager/templates/authentic2/manager/user_detail.html
+++ b/src/authentic2/manager/templates/authentic2/manager/user_detail.html
@@ -31,7 +31,7 @@
{% block afterform %}
{% if object.passwordreset_set.exists %}
{% trans "User must change its password on next access to authentic" %}
-
+
{% endif %}
{% endblock %}
diff --git a/src/authentic2/saml/templates/admin/saml/libertyprovider/add_from_url.html b/src/authentic2/saml/templates/admin/saml/libertyprovider/add_from_url.html
index 37d8b237..54309f27 100644
--- a/src/authentic2/saml/templates/admin/saml/libertyprovider/add_from_url.html
+++ b/src/authentic2/saml/templates/admin/saml/libertyprovider/add_from_url.html
@@ -34,7 +34,7 @@
-
+
diff --git a/src/authentic2/saml/templates/saml/post_form.html b/src/authentic2/saml/templates/saml/post_form.html
index 44d7bdc3..e1339a18 100644
--- a/src/authentic2/saml/templates/saml/post_form.html
+++ b/src/authentic2/saml/templates/saml/post_form.html
@@ -17,7 +17,7 @@
{% endif %}
diff --git a/src/authentic2/templates/authentic2/accounts_delete.html b/src/authentic2/templates/authentic2/accounts_delete.html
index 28e7d4c8..9767ae1d 100644
--- a/src/authentic2/templates/authentic2/accounts_delete.html
+++ b/src/authentic2/templates/authentic2/accounts_delete.html
@@ -17,7 +17,7 @@
{% csrf_token %}
{% trans "Delete my account and all my personal datas ?" %}
{{ form.as_p }}
-
-
+
+
{% endblock %}
diff --git a/src/authentic2/templates/authentic2/accounts_edit.html b/src/authentic2/templates/authentic2/accounts_edit.html
index 9d640b13..d2ec6be9 100644
--- a/src/authentic2/templates/authentic2/accounts_edit.html
+++ b/src/authentic2/templates/authentic2/accounts_edit.html
@@ -26,10 +26,10 @@
{% csrf_token %}
{{ form.as_p }}
{% if form.instance and form.instance.id %}
-
-
+
+
{% else %}
-
+
{% endif %}
{% endblock %}
diff --git a/src/authentic2/templates/authentic2/change_email.html b/src/authentic2/templates/authentic2/change_email.html
index 8f50b1e7..ecdd09f4 100644
--- a/src/authentic2/templates/authentic2/change_email.html
+++ b/src/authentic2/templates/authentic2/change_email.html
@@ -17,7 +17,7 @@
{% endblock %}
diff --git a/src/authentic2/templates/authentic2/homepage.html b/src/authentic2/templates/authentic2/homepage.html
index 4bfc99db..e4c89a44 100644
--- a/src/authentic2/templates/authentic2/homepage.html
+++ b/src/authentic2/templates/authentic2/homepage.html
@@ -31,7 +31,7 @@
{% endfor %}
{% endif %}
-
+
{% endif %}
{% endfor %}
diff --git a/src/authentic2/templates/authentic2/login_password_form.html b/src/authentic2/templates/authentic2/login_password_form.html
index 9d7953fd..2a535245 100644
--- a/src/authentic2/templates/authentic2/login_password_form.html
+++ b/src/authentic2/templates/authentic2/login_password_form.html
@@ -3,9 +3,9 @@
diff --git a/src/authentic2/templates/authentic2/logout_confirm.html b/src/authentic2/templates/authentic2/logout_confirm.html
index 74468c37..ad208d2e 100644
--- a/src/authentic2/templates/authentic2/logout_confirm.html
+++ b/src/authentic2/templates/authentic2/logout_confirm.html
@@ -16,7 +16,7 @@
diff --git a/src/authentic2/templates/interaction/consent_attributes.html b/src/authentic2/templates/interaction/consent_attributes.html
index c64054f2..b78795d6 100644
--- a/src/authentic2/templates/interaction/consent_attributes.html
+++ b/src/authentic2/templates/interaction/consent_attributes.html
@@ -28,11 +28,11 @@
{% if allow_selection %}
-
+
{% else %}
-
+
{% endif %}
-
+
diff --git a/src/authentic2/templates/interaction/consent_federation.html b/src/authentic2/templates/interaction/consent_federation.html
index f62f9a5f..17c6666f 100644
--- a/src/authentic2/templates/interaction/consent_federation.html
+++ b/src/authentic2/templates/interaction/consent_federation.html
@@ -20,8 +20,8 @@
{% csrf_token %}
-
-
+
+
diff --git a/src/authentic2/templates/registration/password_change_form.html b/src/authentic2/templates/registration/password_change_form.html
index 9d97574d..0093e2ad 100644
--- a/src/authentic2/templates/registration/password_change_form.html
+++ b/src/authentic2/templates/registration/password_change_form.html
@@ -18,7 +18,7 @@
{% endblocktrans %}
{% csrf_token %}
{{ form.as_p }}
-
-
+
+
{% endblock %}
diff --git a/src/authentic2/templates/registration/password_reset_confirm.html b/src/authentic2/templates/registration/password_reset_confirm.html
index 69c5d09b..b713d8fe 100644
--- a/src/authentic2/templates/registration/password_reset_confirm.html
+++ b/src/authentic2/templates/registration/password_reset_confirm.html
@@ -13,7 +13,7 @@
{% csrf_token %}
{{ form.as_p }}
-
+
{% else %}
diff --git a/src/authentic2/templates/registration/password_reset_form.html b/src/authentic2/templates/registration/password_reset_form.html
index 7c7d2c12..7ddee74a 100644
--- a/src/authentic2/templates/registration/password_reset_form.html
+++ b/src/authentic2/templates/registration/password_reset_form.html
@@ -13,6 +13,6 @@
{% csrf_token %}
{{ form.as_p }}
-
+
{% endblock %}
diff --git a/src/authentic2/templates/registration/registration_completion_form.html b/src/authentic2/templates/registration/registration_completion_form.html
index 95ce06ae..cd179aaa 100644
--- a/src/authentic2/templates/registration/registration_completion_form.html
+++ b/src/authentic2/templates/registration/registration_completion_form.html
@@ -28,6 +28,6 @@
{% endblock %}
diff --git a/src/authentic2/templates/registration/registration_form.html b/src/authentic2/templates/registration/registration_form.html
index 85a0f5a3..292cf023 100644
--- a/src/authentic2/templates/registration/registration_form.html
+++ b/src/authentic2/templates/registration/registration_form.html
@@ -18,7 +18,7 @@
{% for id, block in frontends.items %}
diff --git a/src/authentic2_auth_saml/templates/authentic2_auth_saml/login.html b/src/authentic2_auth_saml/templates/authentic2_auth_saml/login.html
index 286988bd..656c9aba 100644
--- a/src/authentic2_auth_saml/templates/authentic2_auth_saml/login.html
+++ b/src/authentic2_auth_saml/templates/authentic2_auth_saml/login.html
@@ -1,7 +1,7 @@
{% load i18n %}
diff --git a/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html b/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
index 849eb40b..9c82cbdd 100644
--- a/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
+++ b/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
@@ -16,7 +16,7 @@
{% endif %}
{% csrf_token %}
-
-
+
+
{% endblock %}
diff --git a/tests/test_idp_saml2.py b/tests/test_idp_saml2.py
index 481d50ce..4575121c 100644
--- a/tests/test_idp_saml2.py
+++ b/tests/test_idp_saml2.py
@@ -258,8 +258,7 @@ class SamlSSOTestCase(SamlBaseTestCase):
response = client.get(url)
self.assertEqual(response.status_code, 200)
self.assertEqual(response['Content-Type'].split(';')[0], 'text/html')
- self.assertInHTML(u'' % _('Cancel'), response.content,
+ self.assertInHTML(u'' % _('Cancel'), response.content,
count=1)
if cancel:
response = client.post(url, {
--
2.16.2