##// END OF EJS Templates
templates: Migrate password reset template to pyramid.
johbo -
r32:74a48d81 default
parent child Browse files
Show More
@@ -33,18 +33,26 b''
33 <!-- login -->
33 <!-- login -->
34 <div class="sign-in-title">
34 <div class="sign-in-title">
35 <h1>${_('Reset your Password')}</h1>
35 <h1>${_('Reset your Password')}</h1>
36 <h4>${h.link_to(_("Go to the login page to sign in."),h.url('login'))}</h4>
36 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
37 </div>
37 </div>
38 <div class="inner form">
38 <div class="inner form">
39 ${h.form(url('password_reset'), needs_csrf_token=False)}
39 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
40 <label for="email">${_('Email Address')}:</label>
40 <label for="email">${_('Email Address')}:</label>
41 ${h.text('email')}
41 ${h.text('email', defaults.get('email'))}
42 %if 'email' in errors:
43 <span class="error-message">${errors.get('email')}</span>
44 <br />
45 %endif
42
46
43 %if c.captcha_active:
47 %if captcha_active:
44 <div class="login-captcha"
48 <div class="login-captcha"
45 <label for="email">${_('Captcha')}:</label>
49 <label for="email">${_('Captcha')}:</label>
46 ${h.hidden('recaptcha_field')}
50 ${h.hidden('recaptcha_field')}
47 <div id="recaptcha"></div>
51 <div id="recaptcha"></div>
52 %if 'recaptcha_field' in errors:
53 <span class="error-message">${errors.get('recaptcha_field')}</span>
54 <br />
55 %endif
48 </div>
56 </div>
49 %endif
57 %endif
50
58
@@ -57,14 +65,14 b''
57 </div>
65 </div>
58 </div>
66 </div>
59
67
60 %if c.captcha_active:
68 %if captcha_active:
61 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
69 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
62 %endif
70 %endif
63 <script type="text/javascript">
71 <script type="text/javascript">
64 $(document).ready(function(){
72 $(document).ready(function(){
65 $('#email').focus();
73 $('#email').focus();
66 %if c.captcha_active:
74 %if captcha_active:
67 Recaptcha.create("${c.captcha_public_key}", "recaptcha", {theme: "white"});
75 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
68 %endif
76 %endif
69 });
77 });
70 </script> No newline at end of file
78 </script>
General Comments 0
You need to be logged in to leave comments. Login now