changeset 178cf9ef7604 in modules/web_user:default
details: https://hg.tryton.org/modules/web_user?cmd=changeset;node=178cf9ef7604
description:
        Replace form by link in email

        Using form in email raises warnings on most client.

        issue9273
        review321271002
diffstat:

 email_reset_password.html |  20 ++++++++------------
 email_validation.html     |  20 ++++++++------------
 2 files changed, 16 insertions(+), 24 deletions(-)

diffs (60 lines):

diff -r 437af3a2b3b3 -r 178cf9ef7604 email_reset_password.html
--- a/email_reset_password.html Mon May 04 12:35:40 2020 +0200
+++ b/email_reset_password.html Tue May 19 18:52:22 2020 +0200
@@ -10,18 +10,14 @@
                 <h1>Reset Password</h1>
                 <p>We received a request to reset the password for your 
account,
                 ${user.email}</p>
-                <form action="${user.get_email_reset_password_url()}">
-                    <py:for each="name, value in 
extract_params(user.get_email_reset_password_url())">
-                    <input type="hidden" name="${name}" value="${value}"/>
-                    </py:for>
-                    <button type="submit"
-                            style="cursor:pointer;
-                            padding: 0.5em 1em; font-size:2em;
-                            border: 1px solid #2E6DA4; border-radius: 4px;
-                            color: #FFF; background-color: #337AB7;">
-                        Reset Password
-                    </button>
-                </form>
+                <a href="${user.get_email_reset_password_url()}"
+                   style="display: block; text-decoration: none;
+                          width: max-content; margin: 0 auto;
+                          padding: 0.5em 1em; font-size:2em;
+                          border: 1px solid #2E6DA4; border-radius: 4px;
+                          color: #FFF; background-color: #337AB7;">
+                    Reset Password
+                </a>
             </div>
             <hr style="margin-top: 20px;
             border-style: solid none none; border-color: #EEE"></hr>
diff -r 437af3a2b3b3 -r 178cf9ef7604 email_validation.html
--- a/email_validation.html     Mon May 04 12:35:40 2020 +0200
+++ b/email_validation.html     Tue May 19 18:52:22 2020 +0200
@@ -9,18 +9,14 @@
             <div>
                 <h1>Just one more step..</h1>
                 <p>${user.email}</p>
-                <form action="${user.get_email_validation_url()}">
-                    <py:for each="name, value in 
extract_params(user.get_email_validation_url())">
-                    <input type="hidden" name="${name}" value="${value}"/>
-                    </py:for>
-                    <button type="submit"
-                            style="cursor:pointer;
-                            padding: 0.5em 1em; font-size:2em;
-                            border: 1px solid #2E6DA4; border-radius: 4px;
-                            color: #FFF; background-color: #337AB7;">
-                        Validate
-                    </button>
-                </form>
+                <a href="${user.get_email_validation_url()}"
+                   style="display: block; text-decoration: none;
+                          width: max-content; margin: 0 auto;
+                          padding: 0.5em 1em; font-size:2em;
+                          border: 1px solid #2E6DA4; border-radius: 4px;
+                          color: #FFF; background-color: #337AB7;">
+                    Validate
+                </a>
             </div>
             <hr style="margin-top: 20px;
             border-style: solid none none; border-color: #EEE"></hr>

Reply via email to