Show More
@@ -1,132 +1,147 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base/root.mako"/> |
|
2 | <%inherit file="base/root.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Create an Account')} |
|
5 | ${_('Create an Account')} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 | <style>body{background-color:#eeeeee;}</style> |
|
10 | <style>body{background-color:#eeeeee;}</style> | |
11 |
|
11 | |||
12 | <div class="loginbox"> |
|
12 | <div class="loginbox"> | |
13 | <div class="header"> |
|
13 | <div class="header"> | |
14 | <div id="header-inner" class="title"> |
|
14 | <div id="header-inner" class="title"> | |
15 | <div id="logo"> |
|
15 | <div id="logo"> | |
16 | <div class="logo-wrapper"> |
|
16 | <div class="logo-wrapper"> | |
17 | <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a> |
|
17 | <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a> | |
18 | </div> |
|
18 | </div> | |
19 | %if c.rhodecode_name: |
|
19 | %if c.rhodecode_name: | |
20 | <div class="branding"> ${h.branding(c.rhodecode_name)}</div> |
|
20 | <div class="branding"> ${h.branding(c.rhodecode_name)}</div> | |
21 | %endif |
|
21 | %endif | |
22 | </div> |
|
22 | </div> | |
23 | </div> |
|
23 | </div> | |
24 | </div> |
|
24 | </div> | |
25 |
|
25 | |||
26 | <div class="loginwrapper"> |
|
26 | <div class="loginwrapper"> | |
27 | <rhodecode-toast id="notifications"></rhodecode-toast> |
|
27 | <rhodecode-toast id="notifications"></rhodecode-toast> | |
28 | <div class="left-column"> |
|
28 | <div class="left-column"> | |
29 | <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/> |
|
29 | <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/> | |
30 | </div> |
|
30 | </div> | |
31 | <%block name="above_register_button" /> |
|
31 | <%block name="above_register_button" /> | |
32 | <div id="register" class="right-column"> |
|
32 | <div id="register" class="right-column"> | |
33 | <!-- login --> |
|
33 | <!-- login --> | |
34 | <div class="sign-in-title"> |
|
34 | <div class="sign-in-title"> | |
35 | <h1>${_('Create an account')}</h1> |
|
35 | % if social_auth_provider: | |
|
36 | <h1>${_('Create an account linked with {}').format(social_auth_provider)}</h1> | |||
|
37 | % else: | |||
|
38 | <h1>${_('Create an account')}</h1> | |||
|
39 | % endif | |||
|
40 | ||||
36 | <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4> |
|
41 | <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4> | |
37 | </div> |
|
42 | </div> | |
38 | <div class="inner form"> |
|
43 | <div class="inner form"> | |
39 | ${h.form(request.route_path('register'), needs_csrf_token=False)} |
|
44 | ${h.form(request.route_path('register'), needs_csrf_token=False)} | |
40 |
|
45 | |||
41 | <label for="username">${_('Username')}:</label> |
|
46 | <label for="username">${_('Username')}:</label> | |
42 | ${h.text('username', defaults.get('username'))} |
|
47 | ${h.text('username', defaults.get('username'))} | |
43 | %if 'username' in errors: |
|
48 | %if 'username' in errors: | |
44 | <span class="error-message">${errors.get('username')}</span> |
|
49 | <span class="error-message">${errors.get('username')}</span> | |
45 | <br /> |
|
50 | <br /> | |
46 | %endif |
|
51 | %endif | |
47 |
|
52 | |||
|
53 | % if social_auth_provider: | |||
|
54 | ## hide password prompts for social auth | |||
|
55 | <div style="display: none"> | |||
|
56 | % endif | |||
|
57 | ||||
48 | <label for="password">${_('Password')}:</label> |
|
58 | <label for="password">${_('Password')}:</label> | |
49 | ${h.password('password', defaults.get('password'))} |
|
59 | ${h.password('password', defaults.get('password'))} | |
50 | %if 'password' in errors: |
|
60 | %if 'password' in errors: | |
51 | <span class="error-message">${errors.get('password')}</span> |
|
61 | <span class="error-message">${errors.get('password')}</span> | |
52 | <br /> |
|
62 | <br /> | |
53 | %endif |
|
63 | %endif | |
54 |
|
64 | |||
55 | <label for="password_confirmation">${_('Re-enter password')}:</label> |
|
65 | <label for="password_confirmation">${_('Re-enter password')}:</label> | |
56 | ${h.password('password_confirmation', defaults.get('password_confirmation'))} |
|
66 | ${h.password('password_confirmation', defaults.get('password_confirmation'))} | |
57 | %if 'password_confirmation' in errors: |
|
67 | %if 'password_confirmation' in errors: | |
58 | <span class="error-message">${errors.get('password_confirmation')}</span> |
|
68 | <span class="error-message">${errors.get('password_confirmation')}</span> | |
59 | <br /> |
|
69 | <br /> | |
60 | %endif |
|
70 | %endif | |
61 |
|
71 | |||
|
72 | % if social_auth_provider: | |||
|
73 | ## hide password prompts for social auth | |||
|
74 | </div> | |||
|
75 | % endif | |||
|
76 | ||||
62 | <label for="firstname">${_('First Name')}:</label> |
|
77 | <label for="firstname">${_('First Name')}:</label> | |
63 | ${h.text('firstname', defaults.get('firstname'))} |
|
78 | ${h.text('firstname', defaults.get('firstname'))} | |
64 | %if 'firstname' in errors: |
|
79 | %if 'firstname' in errors: | |
65 | <span class="error-message">${errors.get('firstname')}</span> |
|
80 | <span class="error-message">${errors.get('firstname')}</span> | |
66 | <br /> |
|
81 | <br /> | |
67 | %endif |
|
82 | %endif | |
68 |
|
83 | |||
69 | <label for="lastname">${_('Last Name')}:</label> |
|
84 | <label for="lastname">${_('Last Name')}:</label> | |
70 | ${h.text('lastname', defaults.get('lastname'))} |
|
85 | ${h.text('lastname', defaults.get('lastname'))} | |
71 | %if 'lastname' in errors: |
|
86 | %if 'lastname' in errors: | |
72 | <span class="error-message">${errors.get('lastname')}</span> |
|
87 | <span class="error-message">${errors.get('lastname')}</span> | |
73 | <br /> |
|
88 | <br /> | |
74 | %endif |
|
89 | %endif | |
75 |
|
90 | |||
76 | <label for="email">${_('Email')}:</label> |
|
91 | <label for="email">${_('Email')}:</label> | |
77 | ${h.text('email', defaults.get('email'))} |
|
92 | ${h.text('email', defaults.get('email'))} | |
78 | %if 'email' in errors: |
|
93 | %if 'email' in errors: | |
79 | <span class="error-message">${errors.get('email')}</span> |
|
94 | <span class="error-message">${errors.get('email')}</span> | |
80 | <br /> |
|
95 | <br /> | |
81 | %endif |
|
96 | %endif | |
82 |
|
97 | |||
83 | %if captcha_active: |
|
98 | %if captcha_active: | |
84 | <div> |
|
99 | <div> | |
85 | <label for="recaptcha">${_('Captcha')}:</label> |
|
100 | <label for="recaptcha">${_('Captcha')}:</label> | |
86 | ${h.hidden('recaptcha_field')} |
|
101 | ${h.hidden('recaptcha_field')} | |
87 | <div id="recaptcha"></div> |
|
102 | <div id="recaptcha"></div> | |
88 | %if 'recaptcha_field' in errors: |
|
103 | %if 'recaptcha_field' in errors: | |
89 | <span class="error-message">${errors.get('recaptcha_field')}</span> |
|
104 | <span class="error-message">${errors.get('recaptcha_field')}</span> | |
90 | <br /> |
|
105 | <br /> | |
91 | %endif |
|
106 | %endif | |
92 | </div> |
|
107 | </div> | |
93 | %endif |
|
108 | %endif | |
94 |
|
109 | |||
95 | %if not auto_active: |
|
110 | %if not auto_active: | |
96 | <p class="activation_msg"> |
|
111 | <p class="activation_msg"> | |
97 | ${_('Account activation requires admin approval.')} |
|
112 | ${_('Account activation requires admin approval.')} | |
98 | </p> |
|
113 | </p> | |
99 | %endif |
|
114 | %endif | |
100 | <p class="register_message"> |
|
115 | <p class="register_message"> | |
101 | ${register_message|n} |
|
116 | ${register_message|n} | |
102 | </p> |
|
117 | </p> | |
103 |
|
118 | |||
104 | ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")} |
|
119 | ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")} | |
105 | <p class="help-block pull-right"> |
|
120 | <p class="help-block pull-right"> | |
106 | RhodeCode ${c.rhodecode_edition} |
|
121 | RhodeCode ${c.rhodecode_edition} | |
107 | </p> |
|
122 | </p> | |
108 | ${h.end_form()} |
|
123 | ${h.end_form()} | |
109 | </div> |
|
124 | </div> | |
110 | <%block name="below_register_button" /> |
|
125 | <%block name="below_register_button" /> | |
111 | </div> |
|
126 | </div> | |
112 | </div> |
|
127 | </div> | |
113 | </div> |
|
128 | </div> | |
114 |
|
129 | |||
115 |
|
130 | |||
116 | <script type="text/javascript"> |
|
131 | <script type="text/javascript"> | |
117 | $(document).ready(function(){ |
|
132 | $(document).ready(function(){ | |
118 | $('#username').focus(); |
|
133 | $('#username').focus(); | |
119 | }); |
|
134 | }); | |
120 | </script> |
|
135 | </script> | |
121 |
|
136 | |||
122 | % if captcha_active: |
|
137 | % if captcha_active: | |
123 | <script type="text/javascript"> |
|
138 | <script type="text/javascript"> | |
124 | var onloadCallback = function() { |
|
139 | var onloadCallback = function() { | |
125 | grecaptcha.render('recaptcha', { |
|
140 | grecaptcha.render('recaptcha', { | |
126 | 'sitekey' : "${captcha_public_key}" |
|
141 | 'sitekey' : "${captcha_public_key}" | |
127 | }); |
|
142 | }); | |
128 | }; |
|
143 | }; | |
129 | </script> |
|
144 | </script> | |
130 | <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> |
|
145 | <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> | |
131 | % endif |
|
146 | % endif | |
132 |
|
147 |
General Comments 0
You need to be logged in to leave comments.
Login now