##// END OF EJS Templates
login: show editions in login/register/password-reset boxes.
marcink -
r2819:8640032f default
parent child Browse files
Show More
@@ -1,88 +1,90 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Sign In')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <style>body{background-color:#eeeeee;}</style>
12 12 <div class="loginbox">
13 13 <div class="header">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 %if c.rhodecode_name:
20 20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 21 %endif
22 22 </div>
23 23 </div>
24 24 </div>
25 25
26 26 <div class="loginwrapper">
27 27 <rhodecode-toast id="notifications"></rhodecode-toast>
28 28 <div class="left-column">
29 29 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
30 30 </div>
31 31 <%block name="above_login_button" />
32 32 <div id="login" class="right-column">
33 33 <!-- login -->
34 34 <div class="sign-in-title">
35 35 <h1>${_('Sign In')}</h1>
36 36 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
37 37 <h4>${h.link_to(_("Go to the registration page to create a new account."), request.route_path('register'))}</h4>
38 38 %endif
39 39 </div>
40 40 <div class="inner form">
41 41 ${h.form(request.route_path('login', _query={'came_from': c.came_from}), needs_csrf_token=False)}
42 42
43 43 <label for="username">${_('Username')}:</label>
44 44 ${h.text('username', class_='focus', value=defaults.get('username'))}
45 45 %if 'username' in errors:
46 46 <span class="error-message">${errors.get('username')}</span>
47 47 <br />
48 48 %endif
49 49
50 50 <label for="password">${_('Password')}:</label>
51 51 ${h.password('password', class_='focus')}
52 52 %if 'password' in errors:
53 53 <span class="error-message">${errors.get('password')}</span>
54 54 <br />
55 55 %endif
56 56
57 57 ${h.checkbox('remember', value=True, checked=defaults.get('remember'))}
58 58 <label class="checkbox" for="remember">${_('Remember me')}</label>
59 59
60 60 %if h.HasPermissionAny('hg.password_reset.enabled')():
61 61 <p class="links">
62 62 ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'), class_='pwd_reset')}
63 63 </p>
64 64 %elif h.HasPermissionAny('hg.password_reset.hidden')():
65 65 <p class="help-block">
66 66 ${_('Password reset is disabled. Please contact ')}
67 67 % if c.visual.rhodecode_support_url:
68 68 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
69 69 ${_('or')}
70 70 % endif
71 71 ${_('an administrator if you need help.')}
72 72 </p>
73 73 %endif
74 74
75 75 ${h.submit('sign_in', _('Sign In'), class_="btn sign-in")}
76
76 <p class="help-block pull-right">
77 RhodeCode ${c.rhodecode_edition}
78 </p>
77 79 ${h.end_form()}
78 80 <script type="text/javascript">
79 81 $(document).ready(function(){
80 82 $('#username').focus();
81 83 })
82 84 </script>
83 85 </div>
84 86 <!-- end login -->
85 87 <%block name="below_login_button" />
86 88 </div>
87 89 </div>
88 90 </div>
@@ -1,98 +1,101 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Reset Password')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10 <style>body{background-color:#eeeeee;}</style>
11 11
12 12 <div class="loginbox">
13 13 <div class="header">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 %if c.rhodecode_name:
20 20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 21 %endif
22 22 </div>
23 23 </div>
24 24 </div>
25 25
26 26 <div class="loginwrapper">
27 27 <rhodecode-toast id="notifications"></rhodecode-toast>
28 28 <div class="left-column">
29 29 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
30 30 </div>
31 31
32 32 %if h.HasPermissionAny('hg.password_reset.disabled')():
33 33 <div class="right-column">
34 34 <p>
35 35 ${_('Password reset is disabled. Please contact ')}
36 36 % if c.visual.rhodecode_support_url:
37 37 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
38 38 ${_('or')}
39 39 % endif
40 40 ${_('an administrator if you need help.')}
41 41 </p>
42 42 </div>
43 43 %else:
44 44 <div id="register" class="right-column">
45 45 <!-- login -->
46 46 <div class="sign-in-title">
47 47 <h1>${_('Reset your Password')}</h1>
48 48 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
49 49 </div>
50 50 <div class="inner form">
51 51 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
52 52 <label for="email">${_('Email Address')}:</label>
53 53 ${h.text('email', defaults.get('email'))}
54 54 %if 'email' in errors:
55 55 <span class="error-message">${errors.get('email')}</span>
56 56 <br />
57 57 %endif
58 <p class="help-block">${_('Password reset link will be sent to matching email address')}</p>
58 59
59 60 %if captcha_active:
60 61 <div class="login-captcha">
61 62 <label for="email">${_('Captcha')}:</label>
62 63 ${h.hidden('recaptcha_field')}
63 64 <div id="recaptcha"></div>
64 65
65 66 %if 'recaptcha_field' in errors:
66 67 <span class="error-message">${errors.get('recaptcha_field')}</span>
67 68 <br />
68 69 %endif
69 70 </div>
70 71 %endif
71 72
72 73 ${h.submit('send', _('Send password reset email'), class_="btn sign-in")}
73 <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div>
74 <p class="help-block pull-right">
75 RhodeCode ${c.rhodecode_edition}
76 </p>
74 77
75 78 ${h.end_form()}
76 79 </div>
77 80 </div>
78 81 %endif
79 82 </div>
80 83 </div>
81 84
82 85 <script type="text/javascript">
83 86 $(document).ready(function(){
84 87 $('#email').focus();
85 88 });
86 89 </script>
87 90
88 91 % if captcha_active:
89 92 <script type="text/javascript">
90 93 var onloadCallback = function() {
91 94 grecaptcha.render('recaptcha', {
92 95 'sitekey' : "${captcha_public_key}"
93 96 });
94 97 };
95 98 </script>
96 99 <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
97 100 % endif
98 101
@@ -1,130 +1,132 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Create an Account')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10 <style>body{background-color:#eeeeee;}</style>
11 11
12 12 <div class="loginbox">
13 13 <div class="header">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 %if c.rhodecode_name:
20 20 <div class="branding"> ${h.branding(c.rhodecode_name)}</div>
21 21 %endif
22 22 </div>
23 23 </div>
24 24 </div>
25 25
26 26 <div class="loginwrapper">
27 27 <rhodecode-toast id="notifications"></rhodecode-toast>
28 28 <div class="left-column">
29 29 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
30 30 </div>
31 31 <%block name="above_register_button" />
32 32 <div id="register" class="right-column">
33 33 <!-- login -->
34 34 <div class="sign-in-title">
35 35 <h1>${_('Create an account')}</h1>
36 36 <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4>
37 37 </div>
38 38 <div class="inner form">
39 39 ${h.form(request.route_path('register'), needs_csrf_token=False)}
40 40
41 41 <label for="username">${_('Username')}:</label>
42 42 ${h.text('username', defaults.get('username'))}
43 43 %if 'username' in errors:
44 44 <span class="error-message">${errors.get('username')}</span>
45 45 <br />
46 46 %endif
47 47
48 48 <label for="password">${_('Password')}:</label>
49 49 ${h.password('password', defaults.get('password'))}
50 50 %if 'password' in errors:
51 51 <span class="error-message">${errors.get('password')}</span>
52 52 <br />
53 53 %endif
54 54
55 55 <label for="password_confirmation">${_('Re-enter password')}:</label>
56 56 ${h.password('password_confirmation', defaults.get('password_confirmation'))}
57 57 %if 'password_confirmation' in errors:
58 58 <span class="error-message">${errors.get('password_confirmation')}</span>
59 59 <br />
60 60 %endif
61 61
62 62 <label for="firstname">${_('First Name')}:</label>
63 63 ${h.text('firstname', defaults.get('firstname'))}
64 64 %if 'firstname' in errors:
65 65 <span class="error-message">${errors.get('firstname')}</span>
66 66 <br />
67 67 %endif
68 68
69 69 <label for="lastname">${_('Last Name')}:</label>
70 70 ${h.text('lastname', defaults.get('lastname'))}
71 71 %if 'lastname' in errors:
72 72 <span class="error-message">${errors.get('lastname')}</span>
73 73 <br />
74 74 %endif
75 75
76 76 <label for="email">${_('Email')}:</label>
77 77 ${h.text('email', defaults.get('email'))}
78 78 %if 'email' in errors:
79 79 <span class="error-message">${errors.get('email')}</span>
80 80 <br />
81 81 %endif
82 82
83 83 %if captcha_active:
84 84 <div>
85 85 <label for="recaptcha">${_('Captcha')}:</label>
86 86 ${h.hidden('recaptcha_field')}
87 87 <div id="recaptcha"></div>
88 88 %if 'recaptcha_field' in errors:
89 89 <span class="error-message">${errors.get('recaptcha_field')}</span>
90 90 <br />
91 91 %endif
92 92 </div>
93 93 %endif
94 94
95 95 %if not auto_active:
96 96 <p class="activation_msg">
97 97 ${_('Account activation requires admin approval.')}
98 98 </p>
99 99 %endif
100 100 <p class="register_message">
101 101 ${register_message|n}
102 102 </p>
103 103
104 104 ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")}
105
105 <p class="help-block pull-right">
106 RhodeCode ${c.rhodecode_edition}
107 </p>
106 108 ${h.end_form()}
107 109 </div>
108 110 <%block name="below_register_button" />
109 111 </div>
110 112 </div>
111 113 </div>
112 114
113 115
114 116 <script type="text/javascript">
115 117 $(document).ready(function(){
116 118 $('#username').focus();
117 119 });
118 120 </script>
119 121
120 122 % if captcha_active:
121 123 <script type="text/javascript">
122 124 var onloadCallback = function() {
123 125 grecaptcha.render('recaptcha', {
124 126 'sitekey' : "${captcha_public_key}"
125 127 });
126 128 };
127 129 </script>
128 130 <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
129 131 % endif
130 132
General Comments 0
You need to be logged in to leave comments. Login now