Show More
@@ -1,132 +1,147 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 | · ${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 | <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 | 41 | <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4> |
|
37 | 42 | </div> |
|
38 | 43 | <div class="inner form"> |
|
39 | 44 | ${h.form(request.route_path('register'), needs_csrf_token=False)} |
|
40 | 45 | |
|
41 | 46 | <label for="username">${_('Username')}:</label> |
|
42 | 47 | ${h.text('username', defaults.get('username'))} |
|
43 | 48 | %if 'username' in errors: |
|
44 | 49 | <span class="error-message">${errors.get('username')}</span> |
|
45 | 50 | <br /> |
|
46 | 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 | 58 | <label for="password">${_('Password')}:</label> |
|
49 | 59 | ${h.password('password', defaults.get('password'))} |
|
50 | 60 | %if 'password' in errors: |
|
51 | 61 | <span class="error-message">${errors.get('password')}</span> |
|
52 | 62 | <br /> |
|
53 | 63 | %endif |
|
54 | 64 | |
|
55 | 65 | <label for="password_confirmation">${_('Re-enter password')}:</label> |
|
56 | 66 | ${h.password('password_confirmation', defaults.get('password_confirmation'))} |
|
57 | 67 | %if 'password_confirmation' in errors: |
|
58 | 68 | <span class="error-message">${errors.get('password_confirmation')}</span> |
|
59 | 69 | <br /> |
|
60 | 70 | %endif |
|
61 | 71 | |
|
72 | % if social_auth_provider: | |
|
73 | ## hide password prompts for social auth | |
|
74 | </div> | |
|
75 | % endif | |
|
76 | ||
|
62 | 77 | <label for="firstname">${_('First Name')}:</label> |
|
63 | 78 | ${h.text('firstname', defaults.get('firstname'))} |
|
64 | 79 | %if 'firstname' in errors: |
|
65 | 80 | <span class="error-message">${errors.get('firstname')}</span> |
|
66 | 81 | <br /> |
|
67 | 82 | %endif |
|
68 | 83 | |
|
69 | 84 | <label for="lastname">${_('Last Name')}:</label> |
|
70 | 85 | ${h.text('lastname', defaults.get('lastname'))} |
|
71 | 86 | %if 'lastname' in errors: |
|
72 | 87 | <span class="error-message">${errors.get('lastname')}</span> |
|
73 | 88 | <br /> |
|
74 | 89 | %endif |
|
75 | 90 | |
|
76 | 91 | <label for="email">${_('Email')}:</label> |
|
77 | 92 | ${h.text('email', defaults.get('email'))} |
|
78 | 93 | %if 'email' in errors: |
|
79 | 94 | <span class="error-message">${errors.get('email')}</span> |
|
80 | 95 | <br /> |
|
81 | 96 | %endif |
|
82 | 97 | |
|
83 | 98 | %if captcha_active: |
|
84 | 99 | <div> |
|
85 | 100 | <label for="recaptcha">${_('Captcha')}:</label> |
|
86 | 101 | ${h.hidden('recaptcha_field')} |
|
87 | 102 | <div id="recaptcha"></div> |
|
88 | 103 | %if 'recaptcha_field' in errors: |
|
89 | 104 | <span class="error-message">${errors.get('recaptcha_field')}</span> |
|
90 | 105 | <br /> |
|
91 | 106 | %endif |
|
92 | 107 | </div> |
|
93 | 108 | %endif |
|
94 | 109 | |
|
95 | 110 | %if not auto_active: |
|
96 | 111 | <p class="activation_msg"> |
|
97 | 112 | ${_('Account activation requires admin approval.')} |
|
98 | 113 | </p> |
|
99 | 114 | %endif |
|
100 | 115 | <p class="register_message"> |
|
101 | 116 | ${register_message|n} |
|
102 | 117 | </p> |
|
103 | 118 | |
|
104 | 119 | ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")} |
|
105 | 120 | <p class="help-block pull-right"> |
|
106 | 121 | RhodeCode ${c.rhodecode_edition} |
|
107 | 122 | </p> |
|
108 | 123 | ${h.end_form()} |
|
109 | 124 | </div> |
|
110 | 125 | <%block name="below_register_button" /> |
|
111 | 126 | </div> |
|
112 | 127 | </div> |
|
113 | 128 | </div> |
|
114 | 129 | |
|
115 | 130 | |
|
116 | 131 | <script type="text/javascript"> |
|
117 | 132 | $(document).ready(function(){ |
|
118 | 133 | $('#username').focus(); |
|
119 | 134 | }); |
|
120 | 135 | </script> |
|
121 | 136 | |
|
122 | 137 | % if captcha_active: |
|
123 | 138 | <script type="text/javascript"> |
|
124 | 139 | var onloadCallback = function() { |
|
125 | 140 | grecaptcha.render('recaptcha', { |
|
126 | 141 | 'sitekey' : "${captcha_public_key}" |
|
127 | 142 | }); |
|
128 | 143 | }; |
|
129 | 144 | </script> |
|
130 | 145 | <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> |
|
131 | 146 | % endif |
|
132 | 147 |
General Comments 0
You need to be logged in to leave comments.
Login now