##// END OF EJS Templates
notifications: removing flash_msg #4201
lisaq -
r841:2dc73e8b default
parent child Browse files
Show More
@@ -1,74 +1,70 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.html"/>
3 3
4 ## don't trigger flash messages on this page
5 <%def name="flash_msg()">
6 </%def>
7
8 4 <%def name="title()">
9 5 ${_('%s Creating repository') % c.repo_name}
10 6 %if c.rhodecode_name:
11 7 &middot; ${h.branding(c.rhodecode_name)}
12 8 %endif
13 9 </%def>
14 10
15 11 <%def name="breadcrumbs_links()">
16 12 ${_('Creating repository')} ${c.repo}
17 13 </%def>
18 14
19 15 <%def name="menu_bar_nav()">
20 16 ${self.menu_items(active='repositories')}
21 17 </%def>
22 18 <%def name="main()">
23 19 <div class="box">
24 20 <!-- box / title -->
25 21 <div class="title">
26 22 ${self.breadcrumbs()}
27 23 </div>
28 24
29 25 <div id="progress-message">
30 26 ${_('Repository "%(repo_name)s" is being created, you will be redirected when this process is finished.' % {'repo_name':c.repo_name})}
31 27 </div>
32 28
33 29 <div id="progress">
34 30 <div class="progress progress-striped active">
35 31 <div class="progress-bar progress-bar" role="progressbar"
36 32 aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
37 33 </div>
38 34 </div>
39 35 </div>
40 36 </div>
41 37
42 38 <script>
43 39 (function worker() {
44 40 var skipCheck = false;
45 41 var url = "${h.url('repo_check_home', repo_name=c.repo_name, repo=c.repo, task_id=c.task_id)}";
46 42 $.ajax({
47 43 url: url,
48 44 complete: function(resp) {
49 45 if (resp.status == 200) {
50 46 var jsonResponse = resp.responseJSON;
51 47
52 48 if (jsonResponse === undefined) {
53 49 setTimeout(function () {
54 50 // we might have a backend problem, try dashboard again
55 51 window.location = "${h.url('summary_home', repo_name = c.repo)}";
56 52 }, 3000);
57 53 } else {
58 54 if (skipCheck || jsonResponse.result === true) {
59 55 // success, means go to dashboard
60 56 window.location = "${h.url('summary_home', repo_name = c.repo)}";
61 57 } else {
62 58 // Schedule the next request when the current one's complete
63 59 setTimeout(worker, 1000);
64 60 }
65 61 }
66 62 }
67 63 else {
68 64 window.location = "${h.url('home')}";
69 65 }
70 66 }
71 67 });
72 68 })();
73 69 </script>
74 70 </%def> No newline at end of file
@@ -1,245 +1,243 b''
1 1 ${h.secure_form(url('admin_settings_global'), method='post')}
2 2
3 3 <div class="panel panel-default">
4 4 <div class="panel-heading" id="branding-options">
5 5 <h3 class="panel-title">${_('Branding')} <a class="permalink" href="#branding-options"></a></h3>
6 6 </div>
7 7 <div class="panel-body">
8 8 <div class="label">
9 9 <label for="rhodecode_title">${_('Title')}</label>
10 10 </div>
11 11 <div class="field input">
12 12 ${h.text('rhodecode_title',size=60)}
13 13 </div>
14 14 <div class="field">
15 15 <span class="help-block">
16 16 ${_('Set a custom title for your RhodeCode instance (limited to 40 characters).')}
17 17 </span>
18 18 </div>
19 19 <div class="label">
20 20 <label for="rhodecode_realm">${_('HTTP[S] authentication realm')}</label>
21 21 </div>
22 22 <div class="field input">
23 23 ${h.text('rhodecode_realm',size=60)}
24 24 </div>
25 25 <div class="field">
26 26 <span class="help-block">
27 27 ${_('Set a custom text that is shown as authentication message to clients trying to connect.')}
28 28 </span>
29 29 </div>
30 30 </div>
31 31 </div>
32 32
33 33 <div class="panel panel-default">
34 34 <div class="panel-heading" id="captcha-options">
35 35 <h3 class="panel-title">${_('Registration Captcha')} <a class="permalink" href="#captcha-options"></a></h3>
36 36 </div>
37 37 <div class="panel-body">
38 38 <div class="label">
39 39 <label for="rhodecode_captcha_public_key">${_('Google ReCaptcha public key')}</label>
40 40 </div>
41 41 <div class="field input">
42 42 ${h.text('rhodecode_captcha_public_key',size=60)}
43 43 </div>
44 44 <div class="field">
45 45 <span class="help-block">
46 46 ${_('Public key for reCaptcha system.')}
47 47 </span>
48 48 </div>
49 49
50 50 <div class="label">
51 51 <label for="rhodecode_captcha_private_key">${_('Google ReCaptcha private key')}</label>
52 52 </div>
53 53 <div class="field input">
54 54 ${h.text('rhodecode_captcha_private_key',size=60)}
55 55 </div>
56 56 <div class="field">
57 57 <span class="help-block">
58 58 ${_('Private key for reCaptcha system. Setting this value will enable captcha on registration')}
59 59 </span>
60 60 </div>
61 61 </div>
62 62 </div>
63 63
64 64 <div class="panel panel-default">
65 65 <div class="panel-heading" id="header-code-options">
66 66 <h3 class="panel-title">${_('Custom Header Code')} <a class="permalink" href="#header-code-options"></a></h3>
67 67 </div>
68 68 <div class="panel-body">
69 69 <div class="select">
70 70 <select id="pre_template" >
71 71 <option value="#">${_('Templates...')}</option>
72 72 <option value="ga">Google Analytics</option>
73 73 <option value="clicky">Clicky</option>
74 74 <option value="server_announce">${_('Server Announcement')}</option>
75 75 </select>
76 76 </div>
77 77 <div style="padding: 10px 0px"></div>
78 78 <div class="textarea text-area">
79 79 ${h.textarea('rhodecode_pre_code',cols=23,rows=5,class_="medium")}
80 80 <span class="help-block">${_('Custom js/css code added at the end of the <header/> tag.')}
81 81 ${_('Use <script/> or <css/> tags to define custom styling or scripting')}</span>
82 82 </div>
83 83 </div>
84 84 </div>
85 85
86 86 <div class="panel panel-default">
87 87 <div class="panel-heading" id="footer-code-options">
88 88 <h3 class="panel-title">${_('Custom Footer Code')} <a class="permalink" href="#footer-code-options"> ¶</a></h3>
89 89 </div>
90 90 <div class="panel-body">
91 91 <div class="select">
92 92 <select id="post_template" >
93 93 <option value="#">${_('Templates...')}</option>
94 94 <option value="ga">Google Analytics</option>
95 95 <option value="clicky">Clicky</option>
96 96 <option value="server_announce">${_('Server Announcement')}</option>
97 97 </select>
98 98 </div>
99 99 <div style="padding: 10px 0px"></div>
100 100 <div class="textarea text-area">
101 101 ${h.textarea('rhodecode_post_code',cols=23,rows=5, class_="medium")}
102 102 <span class="help-block">${_('Custom js/css code added at the end of the <body> tag.')}
103 103 ${_('Use <script> or <css> tags to define custom styling or scripting')}</span>
104 104 </div>
105 105 </div>
106 106 </div>
107 107
108 108 <div class="buttons">
109 109 ${h.submit('save',_('Save settings'),class_="btn")}
110 110 ${h.reset('reset',_('Reset'),class_="btn")}
111 111 </div>
112 112 ${h.end_form()}
113 113
114 114
115 115
116 116 ## TEMPLATES ##
117 117 ###############
118 118
119 119 <script id="ga_tmpl" type="text/x-template">
120 120 <%text filter="h">
121 121 <script>
122 122 // Google Analytics
123 123 // Put your Google Analytics code instead of _GACODE_
124 124 var _gaq_code = '_GACODE_';
125 125 var _gaq = _gaq || [];
126 126 _gaq.push(['_setAccount', _gaq_code]);
127 127 _gaq.push(['_trackPageview']);
128 128
129 129 (function() {
130 130 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
131 131 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
132 132 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
133 133 })();
134 134
135 135 rhodecode_statechange_callback = function(url, data){
136 136 // ANALYTICS callback on html5 history state changed
137 137 // triggered by file browser, url is the new url,
138 138 // data is extra info passed from the State object
139 139 if (typeof window._gaq !== 'undefined') {
140 140 _gaq.push(['_trackPageview', url]);
141 141 }
142 142 };
143 143 </script>
144 144 </%text>
145 145 </script>
146 146
147 147
148 148
149 149 <script id="clicky_tmpl" type="text/x-template">
150 150 <%text filter="h">
151 151 <script src="//static.getclicky.com/js" type="text/javascript"></script>
152 152 <script type="text/javascript">
153 153 // Clicky Analytics - should be used in the footer code section.
154 154 // Put your Clicky code instead of _CLICKYCODE_ here,
155 155 // and below in the <img> tag.
156 156 var _cl_code = _CLICKYCODE_;
157 157 try{clicky.init(_cl_code);}catch(e){}
158 158
159 159 rhodecode_statechange_callback = function(url, data){
160 160 // ANALYTICS callback on html5 history state changed
161 161 // triggered by file browser, url is the new url,
162 162 // data is extra info passed from the State object
163 163 if (typeof window.clicky !== 'undefined') {
164 164 clicky.log(url);
165 165 }
166 166 }
167 167 </script>
168 168 <noscript>
169 169 // Put your clicky code in the src file.
170 170 <p><img alt="Clicky" width="1" height="1"
171 171 src="//in.getclicky.com/_CLICKYCODE_ns.gif" /></p>
172 172 </noscript>
173 173 </%text>
174 174 </script>
175 175
176 176
177 177
178 178 <script id="server_announce_tmpl" type='text/x-template'>
179 179 <%text filter="h">
180 180 <script>
181 181 // Server announcement displayed on the top of the page.
182 182 // This can be used to send a global maintainance messages or other
183 183 // important messages to all users of the RhodeCode Enterprise system.
184 184
185 185 $(document).ready(function(e){
186 186 // put your message below
187 187 var message = "TYPE YOUR MESSAGE HERE";
188 188
189 189 $('#body').prepend(
190 ('<div class="flash_msg">'+
191 '<div class="alert alert-info">_MSG_'+
192 '</div></div>').replace('_MSG_', message)
190 ('<div class="alert alert-info">_MSG_'+'</div>').replace('_MSG_', message)
193 191 )
194 192 })
195 193 </script>
196 194 </%text>
197 195 </script>
198 196
199 197
200 198
201 199 <script>
202 200 var pre_cm = initCodeMirror('rhodecode_pre_code', '', false);
203 201 var pre_old = pre_cm.getValue();
204 202
205 203 var post_cm = initCodeMirror('rhodecode_post_code', '', false);
206 204 var post_old = post_cm.getValue();
207 205
208 206 var get_data = function(type, old){
209 207 var get_tmpl = function(tmpl_name){
210 208 // unescape some stuff
211 209 var html = htmlEnDeCode.htmlDecode($('#'+tmpl_name+'_tmpl').html());
212 210 return html;
213 211 };
214 212 return {
215 213 '#': old,
216 214 'ga': get_tmpl('ga'),
217 215 'clicky': get_tmpl('clicky'),
218 216 'server_announce': get_tmpl('server_announce')
219 217 }[type]
220 218 };
221 219
222 220 $('#pre_template').select2({
223 221 containerCssClass: 'drop-menu',
224 222 dropdownCssClass: 'drop-menu-dropdown',
225 223 dropdownAutoWidth: true,
226 224 minimumResultsForSearch: -1
227 225 });
228 226
229 227 $('#post_template').select2({
230 228 containerCssClass: 'drop-menu',
231 229 dropdownCssClass: 'drop-menu-dropdown',
232 230 dropdownAutoWidth: true,
233 231 minimumResultsForSearch: -1
234 232 });
235 233
236 234 $('#post_template').on('change', function(e){
237 235 var sel = this.value;
238 236 post_cm.setValue(get_data(sel, post_old))
239 237 });
240 238
241 239 $('#pre_template').on('change', function(e){
242 240 var sel = this.value;
243 241 pre_cm.setValue(get_data(sel, pre_old))
244 242 })
245 243 </script>
@@ -1,656 +1,651 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="root.html"/>
3 3
4 4 <div class="outerwrapper">
5 5 <!-- HEADER -->
6 6 <div class="header">
7 7 <div id="header-inner" class="wrapper">
8 8 <div id="logo">
9 9 <div class="logo-wrapper">
10 10 <a href="${h.url('home')}"><img src="${h.asset('images/rhodecode-logo-white-216x60.png')}" alt="RhodeCode"/></a>
11 11 </div>
12 12 %if c.rhodecode_name:
13 13 <div class="branding">- ${h.branding(c.rhodecode_name)}</div>
14 14 %endif
15 15 </div>
16 16 <!-- MENU BAR NAV -->
17 17 ${self.menu_bar_nav()}
18 18 <!-- END MENU BAR NAV -->
19 19 </div>
20 20 </div>
21 21 ${self.menu_bar_subnav()}
22 22 <!-- END HEADER -->
23 23
24 24 <!-- CONTENT -->
25 25 <div id="content" class="wrapper">
26 ${self.flash_msg()}
27 26 <div class="main">
28 27 ${next.main()}
29 28 </div>
30 29 </div>
31 30 <!-- END CONTENT -->
32 31
33 32 </div>
34 33 <!-- FOOTER -->
35 34 <div id="footer">
36 35 <div id="footer-inner" class="title wrapper">
37 36 <div>
38 37 <p class="footer-link-right">
39 38 % if c.visual.show_version:
40 39 RhodeCode Enterprise ${c.rhodecode_version} ${c.rhodecode_edition}
41 40 % endif
42 41 &copy; 2010-${h.datetime.today().year}, <a href="${h.url('rhodecode_official')}" target="_blank">RhodeCode GmbH</a>. All rights reserved.
43 42 % if c.visual.rhodecode_support_url:
44 43 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
45 44 % endif
46 45 </p>
47 46 <% sid = 'block' if request.GET.get('showrcid') else 'none' %>
48 47 <p class="server-instance" style="display:${sid}">
49 48 ## display hidden instance ID if specially defined
50 49 % if c.rhodecode_instanceid:
51 50 ${_('RhodeCode instance id: %s') % c.rhodecode_instanceid}
52 51 % endif
53 52 </p>
54 53 </div>
55 54 </div>
56 55 </div>
57 56
58 57 <!-- END FOOTER -->
59 58
60 59 ### MAKO DEFS ###
61 60
62 61 <%def name="menu_bar_subnav()">
63 62 </%def>
64 63
65 <%def name="flash_msg()">
66 <%include file="/base/flash_msg.html"/>
67 </%def>
68
69 64 <%def name="breadcrumbs(class_='breadcrumbs')">
70 65 <div class="${class_}">
71 66 ${self.breadcrumbs_links()}
72 67 </div>
73 68 </%def>
74 69
75 70 <%def name="admin_menu()">
76 71 <ul class="admin_menu submenu">
77 72 <li><a href="${h.url('admin_home')}">${_('Admin journal')}</a></li>
78 73 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
79 74 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
80 75 <li><a href="${h.url('users')}">${_('Users')}</a></li>
81 76 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
82 77 <li><a href="${h.url('admin_permissions_application')}">${_('Permissions')}</a></li>
83 78 <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
84 79 <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
85 80 <li><a href="${h.url('admin_defaults_repositories')}">${_('Defaults')}</a></li>
86 81 <li class="last"><a href="${h.url('admin_settings')}">${_('Settings')}</a></li>
87 82 </ul>
88 83 </%def>
89 84
90 85
91 86 <%def name="dt_info_panel(elements)">
92 87 <dl class="dl-horizontal">
93 88 %for dt, dd, title, show_items in elements:
94 89 <dt>${dt}:</dt>
95 90 <dd title="${title}">
96 91 %if callable(dd):
97 92 ## allow lazy evaluation of elements
98 93 ${dd()}
99 94 %else:
100 95 ${dd}
101 96 %endif
102 97 %if show_items:
103 98 <span class="btn-collapse" data-toggle="item-${h.md5(dt)[:6]}-details">${_('Show More')} </span>
104 99 %endif
105 100 </dd>
106 101
107 102 %if show_items:
108 103 <div class="collapsable-content" data-toggle="item-${h.md5(dt)[:6]}-details" style="display: none">
109 104 %for item in show_items:
110 105 <dt></dt>
111 106 <dd>${item}</dd>
112 107 %endfor
113 108 </div>
114 109 %endif
115 110
116 111 %endfor
117 112 </dl>
118 113 </%def>
119 114
120 115
121 116 <%def name="gravatar(email, size=16)">
122 117 <%
123 118 if (size > 16):
124 119 gravatar_class = 'gravatar gravatar-large'
125 120 else:
126 121 gravatar_class = 'gravatar'
127 122 %>
128 123 <%doc>
129 124 TODO: johbo: For now we serve double size images to make it smooth
130 125 for retina. This is how it worked until now. Should be replaced
131 126 with a better solution at some point.
132 127 </%doc>
133 128 <img class="${gravatar_class}" src="${h.gravatar_url(email, size * 2)}" height="${size}" width="${size}">
134 129 </%def>
135 130
136 131
137 132 <%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
138 133 <% email = h.email_or_none(contact) %>
139 134 <div class="rc-user tooltip" title="${h.author_string(email)}">
140 135 ${self.gravatar(email, size)}
141 136 <span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
142 137 </div>
143 138 </%def>
144 139
145 140
146 141 ## admin menu used for people that have some admin resources
147 142 <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
148 143 <ul class="submenu">
149 144 %if repositories:
150 145 <li><a href="${h.url('repos')}">${_('Repositories')}</a></li>
151 146 %endif
152 147 %if repository_groups:
153 148 <li><a href="${h.url('repo_groups')}">${_('Repository groups')}</a></li>
154 149 %endif
155 150 %if user_groups:
156 151 <li><a href="${h.url('users_groups')}">${_('User groups')}</a></li>
157 152 %endif
158 153 </ul>
159 154 </%def>
160 155
161 156 <%def name="repo_page_title(repo_instance)">
162 157 <div class="title-content">
163 158 <div class="title-main">
164 159 ## SVN/HG/GIT icons
165 160 %if h.is_hg(repo_instance):
166 161 <i class="icon-hg"></i>
167 162 %endif
168 163 %if h.is_git(repo_instance):
169 164 <i class="icon-git"></i>
170 165 %endif
171 166 %if h.is_svn(repo_instance):
172 167 <i class="icon-svn"></i>
173 168 %endif
174 169
175 170 ## public/private
176 171 %if repo_instance.private:
177 172 <i class="icon-repo-private"></i>
178 173 %else:
179 174 <i class="icon-repo-public"></i>
180 175 %endif
181 176
182 177 ## repo name with group name
183 178 ${h.breadcrumb_repo_link(c.rhodecode_db_repo)}
184 179
185 180 </div>
186 181
187 182 ## FORKED
188 183 %if repo_instance.fork:
189 184 <p>
190 185 <i class="icon-code-fork"></i> ${_('Fork of')}
191 186 <a href="${h.url('summary_home',repo_name=repo_instance.fork.repo_name)}">${repo_instance.fork.repo_name}</a>
192 187 </p>
193 188 %endif
194 189
195 190 ## IMPORTED FROM REMOTE
196 191 %if repo_instance.clone_uri:
197 192 <p>
198 193 <i class="icon-code-fork"></i> ${_('Clone from')}
199 194 <a href="${h.url(h.safe_str(h.hide_credentials(repo_instance.clone_uri)))}">${h.hide_credentials(repo_instance.clone_uri)}</a>
200 195 </p>
201 196 %endif
202 197
203 198 ## LOCKING STATUS
204 199 %if repo_instance.locked[0]:
205 200 <p class="locking_locked">
206 201 <i class="icon-repo-lock"></i>
207 202 ${_('Repository locked by %(user)s') % {'user': h.person_by_id(repo_instance.locked[0])}}
208 203 </p>
209 204 %elif repo_instance.enable_locking:
210 205 <p class="locking_unlocked">
211 206 <i class="icon-repo-unlock"></i>
212 207 ${_('Repository not locked. Pull repository to lock it.')}
213 208 </p>
214 209 %endif
215 210
216 211 </div>
217 212 </%def>
218 213
219 214 <%def name="repo_menu(active=None)">
220 215 <%
221 216 def is_active(selected):
222 217 if selected == active:
223 218 return "active"
224 219 %>
225 220
226 221 <!--- CONTEXT BAR -->
227 222 <div id="context-bar">
228 223 <div class="wrapper">
229 224 <ul id="context-pages" class="horizontal-list navigation">
230 225 <li class="${is_active('summary')}"><a class="menulink" href="${h.url('summary_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Summary')}</div></a></li>
231 226 <li class="${is_active('changelog')}"><a class="menulink" href="${h.url('changelog_home', repo_name=c.repo_name)}"><div class="menulabel">${_('Changelog')}</div></a></li>
232 227 <li class="${is_active('files')}"><a class="menulink" href="${h.url('files_home', repo_name=c.repo_name, revision=c.rhodecode_db_repo.landing_rev[1])}"><div class="menulabel">${_('Files')}</div></a></li>
233 228 <li class="${is_active('compare')}">
234 229 <a class="menulink" href="${h.url('compare_home',repo_name=c.repo_name)}"><div class="menulabel">${_('Compare')}</div></a>
235 230 </li>
236 231 ## TODO: anderson: ideally it would have a function on the scm_instance "enable_pullrequest() and enable_fork()"
237 232 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
238 233 <li class="${is_active('showpullrequest')}">
239 234 <a class="menulink" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}">
240 235 %if c.repository_pull_requests:
241 236 <span class="pr_notifications">${c.repository_pull_requests}</span>
242 237 %endif
243 238 <div class="menulabel">${_('Pull Requests')}</div>
244 239 </a>
245 240 </li>
246 241 %endif
247 242 <li class="${is_active('options')}">
248 243 <a class="menulink" href="#" class="dropdown"><div class="menulabel">${_('Options')} <div class="show_more"></div></div></a>
249 244 <ul class="submenu">
250 245 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
251 246 <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}">${_('Settings')}</a></li>
252 247 %endif
253 248 %if c.rhodecode_db_repo.fork:
254 249 <li><a href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,source_ref_type=c.rhodecode_db_repo.landing_rev[0],source_ref=c.rhodecode_db_repo.landing_rev[1], target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0],target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], merge=1)}">
255 250 ${_('Compare fork')}</a></li>
256 251 %endif
257 252
258 253 <li><a href="${h.url('search_repo_home',repo_name=c.repo_name)}">${_('Search')}</a></li>
259 254
260 255 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
261 256 %if c.rhodecode_db_repo.locked[0]:
262 257 <li><a class="locking_del" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li>
263 258 %else:
264 259 <li><a class="locking_add" href="${h.url('toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li>
265 260 %endif
266 261 %endif
267 262 %if c.rhodecode_user.username != h.DEFAULT_USER:
268 263 %if c.rhodecode_db_repo.repo_type in ['git','hg']:
269 264 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}">${_('Fork')}</a></li>
270 265 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li>
271 266 %endif
272 267 %endif
273 268 </ul>
274 269 </li>
275 270 </ul>
276 271 </div>
277 272 <div class="clear"></div>
278 273 </div>
279 274 <!--- END CONTEXT BAR -->
280 275
281 276 </%def>
282 277
283 278 <%def name="usermenu()">
284 279 ## USER MENU
285 280 <li id="quick_login_li">
286 281 <a id="quick_login_link" class="menulink childs">
287 282 ${gravatar(c.rhodecode_user.email, 20)}
288 283 <span class="user">
289 284 %if c.rhodecode_user.username != h.DEFAULT_USER:
290 285 <span class="menu_link_user">${c.rhodecode_user.username}</span><div class="show_more"></div>
291 286 %else:
292 287 <span>${_('Sign in')}</span>
293 288 %endif
294 289 </span>
295 290 </a>
296 291
297 292 <div class="user-menu submenu">
298 293 <div id="quick_login">
299 294 %if c.rhodecode_user.username == h.DEFAULT_USER:
300 295 <h4>${_('Sign in to your account')}</h4>
301 296 ${h.form(h.route_path('login', _query={'came_from': h.url.current()}), needs_csrf_token=False)}
302 297 <div class="form form-vertical">
303 298 <div class="fields">
304 299 <div class="field">
305 300 <div class="label">
306 301 <label for="username">${_('Username')}:</label>
307 302 </div>
308 303 <div class="input">
309 304 ${h.text('username',class_='focus',tabindex=1)}
310 305 </div>
311 306
312 307 </div>
313 308 <div class="field">
314 309 <div class="label">
315 310 <label for="password">${_('Password')}:</label>
316 311 <span class="forgot_password">${h.link_to(_('(Forgot password?)'),h.route_path('reset_password'))}</span>
317 312 </div>
318 313 <div class="input">
319 314 ${h.password('password',class_='focus',tabindex=2)}
320 315 </div>
321 316 </div>
322 317 <div class="buttons">
323 318 <div class="register">
324 319 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
325 320 ${h.link_to(_("Don't have an account ?"),h.route_path('register'))}
326 321 %endif
327 322 </div>
328 323 <div class="submit">
329 324 ${h.submit('sign_in',_('Sign In'),class_="btn btn-small",tabindex=3)}
330 325 </div>
331 326 </div>
332 327 </div>
333 328 </div>
334 329 ${h.end_form()}
335 330 %else:
336 331 <div class="">
337 332 <div class="big_gravatar">${gravatar(c.rhodecode_user.email, 48)}</div>
338 333 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
339 334 <div class="email">${c.rhodecode_user.email}</div>
340 335 </div>
341 336 <div class="">
342 337 <ol class="links">
343 338 <li>${h.link_to(_(u'My account'),h.url('my_account'))}</li>
344 339 <li class="logout">
345 340 ${h.secure_form(h.route_path('logout'))}
346 341 ${h.submit('log_out', _(u'Sign Out'),class_="btn btn-primary")}
347 342 ${h.end_form()}
348 343 </li>
349 344 </ol>
350 345 </div>
351 346 %endif
352 347 </div>
353 348 </div>
354 349 %if c.rhodecode_user.username != h.DEFAULT_USER:
355 350 <div class="pill_container">
356 351 % if c.unread_notifications == 0:
357 352 <a class="menu_link_notifications empty" href="${h.url('notifications')}">${c.unread_notifications}</a>
358 353 % else:
359 354 <a class="menu_link_notifications" href="${h.url('notifications')}">${c.unread_notifications}</a>
360 355 % endif
361 356 </div>
362 357 % endif
363 358 </li>
364 359 </%def>
365 360
366 361 <%def name="menu_items(active=None)">
367 362 <%
368 363 def is_active(selected):
369 364 if selected == active:
370 365 return "active"
371 366 return ""
372 367 %>
373 368 <ul id="quick" class="main_nav navigation horizontal-list">
374 369 <!-- repo switcher -->
375 370 <li class="${is_active('repositories')} repo_switcher_li has_select2">
376 371 <input id="repo_switcher" name="repo_switcher" type="hidden">
377 372 </li>
378 373
379 374 ## ROOT MENU
380 375 %if c.rhodecode_user.username != h.DEFAULT_USER:
381 376 <li class="${is_active('journal')}">
382 377 <a class="menulink" title="${_('Show activity journal')}" href="${h.url('journal')}">
383 378 <div class="menulabel">${_('Journal')}</div>
384 379 </a>
385 380 </li>
386 381 %else:
387 382 <li class="${is_active('journal')}">
388 383 <a class="menulink" title="${_('Show Public activity journal')}" href="${h.url('public_journal')}">
389 384 <div class="menulabel">${_('Public journal')}</div>
390 385 </a>
391 386 </li>
392 387 %endif
393 388 <li class="${is_active('gists')}">
394 389 <a class="menulink childs" title="${_('Show Gists')}" href="${h.url('gists')}">
395 390 <div class="menulabel">${_('Gists')}</div>
396 391 </a>
397 392 </li>
398 393 <li class="${is_active('search')}">
399 394 <a class="menulink" title="${_('Search in repositories you have access to')}" href="${h.url('search')}">
400 395 <div class="menulabel">${_('Search')}</div>
401 396 </a>
402 397 </li>
403 398 % if h.HasPermissionAll('hg.admin')('access admin main page'):
404 399 <li class="${is_active('admin')}">
405 400 <a class="menulink childs" title="${_('Admin settings')}" href="#" onclick="return false;">
406 401 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
407 402 </a>
408 403 ${admin_menu()}
409 404 </li>
410 405 % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
411 406 <li class="${is_active('admin')}">
412 407 <a class="menulink childs" title="${_('Delegated Admin settings')}">
413 408 <div class="menulabel">${_('Admin')} <div class="show_more"></div></div>
414 409 </a>
415 410 ${admin_menu_simple(c.rhodecode_user.repositories_admin,
416 411 c.rhodecode_user.repository_groups_admin,
417 412 c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
418 413 </li>
419 414 % endif
420 415 % if c.debug_style:
421 416 <li class="${is_active('debug_style')}">
422 417 <a class="menulink" title="${_('Style')}" href="${h.url('debug_style_home')}">
423 418 <div class="menulabel">${_('Style')}</div>
424 419 </a>
425 420 </li>
426 421 % endif
427 422 ## render extra user menu
428 423 ${usermenu()}
429 424 </ul>
430 425
431 426 <script type="text/javascript">
432 427 var visual_show_public_icon = "${c.visual.show_public_icon}" == "True";
433 428
434 429 /*format the look of items in the list*/
435 430 var format = function(state, escapeMarkup){
436 431 if (!state.id){
437 432 return state.text; // optgroup
438 433 }
439 434 var obj_dict = state.obj;
440 435 var tmpl = '';
441 436
442 437 if(obj_dict && state.type == 'repo'){
443 438 if(obj_dict['repo_type'] === 'hg'){
444 439 tmpl += '<i class="icon-hg"></i> ';
445 440 }
446 441 else if(obj_dict['repo_type'] === 'git'){
447 442 tmpl += '<i class="icon-git"></i> ';
448 443 }
449 444 else if(obj_dict['repo_type'] === 'svn'){
450 445 tmpl += '<i class="icon-svn"></i> ';
451 446 }
452 447 if(obj_dict['private']){
453 448 tmpl += '<i class="icon-lock" ></i> ';
454 449 }
455 450 else if(visual_show_public_icon){
456 451 tmpl += '<i class="icon-unlock-alt"></i> ';
457 452 }
458 453 }
459 454 if(obj_dict && state.type == 'commit') {
460 455 tmpl += '<i class="icon-tag"></i>';
461 456 }
462 457 if(obj_dict && state.type == 'group'){
463 458 tmpl += '<i class="icon-folder-close"></i> ';
464 459 }
465 460 tmpl += escapeMarkup(state.text);
466 461 return tmpl;
467 462 };
468 463
469 464 var formatResult = function(result, container, query, escapeMarkup) {
470 465 return format(result, escapeMarkup);
471 466 };
472 467
473 468 var formatSelection = function(data, container, escapeMarkup) {
474 469 return format(data, escapeMarkup);
475 470 };
476 471
477 472 $("#repo_switcher").select2({
478 473 cachedDataSource: {},
479 474 minimumInputLength: 2,
480 475 placeholder: '<div class="menulabel">${_('Go to')} <div class="show_more"></div></div>',
481 476 dropdownAutoWidth: true,
482 477 formatResult: formatResult,
483 478 formatSelection: formatSelection,
484 479 containerCssClass: "repo-switcher",
485 480 dropdownCssClass: "repo-switcher-dropdown",
486 481 escapeMarkup: function(m){
487 482 // don't escape our custom placeholder
488 483 if(m.substr(0,23) == '<div class="menulabel">'){
489 484 return m;
490 485 }
491 486
492 487 return Select2.util.escapeMarkup(m);
493 488 },
494 489 query: $.debounce(250, function(query){
495 490 self = this;
496 491 var cacheKey = query.term;
497 492 var cachedData = self.cachedDataSource[cacheKey];
498 493
499 494 if (cachedData) {
500 495 query.callback({results: cachedData.results});
501 496 } else {
502 497 $.ajax({
503 498 url: "${h.url('goto_switcher_data')}",
504 499 data: {'query': query.term},
505 500 dataType: 'json',
506 501 type: 'GET',
507 502 success: function(data) {
508 503 self.cachedDataSource[cacheKey] = data;
509 504 query.callback({results: data.results});
510 505 },
511 506 error: function(data, textStatus, errorThrown) {
512 507 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
513 508 }
514 509 })
515 510 }
516 511 })
517 512 });
518 513
519 514 $("#repo_switcher").on('select2-selecting', function(e){
520 515 e.preventDefault();
521 516 window.location = e.choice.url;
522 517 });
523 518
524 519 ## Global mouse bindings ##
525 520
526 521 // general help "?"
527 522 Mousetrap.bind(['?'], function(e) {
528 523 $('#help_kb').modal({})
529 524 });
530 525
531 526 // / open the quick filter
532 527 Mousetrap.bind(['/'], function(e) {
533 528 $("#repo_switcher").select2("open");
534 529
535 530 // return false to prevent default browser behavior
536 531 // and stop event from bubbling
537 532 return false;
538 533 });
539 534
540 535 // general nav g + action
541 536 Mousetrap.bind(['g h'], function(e) {
542 537 window.location = pyroutes.url('home');
543 538 });
544 539 Mousetrap.bind(['g g'], function(e) {
545 540 window.location = pyroutes.url('gists', {'private':1});
546 541 });
547 542 Mousetrap.bind(['g G'], function(e) {
548 543 window.location = pyroutes.url('gists', {'public':1});
549 544 });
550 545 Mousetrap.bind(['n g'], function(e) {
551 546 window.location = pyroutes.url('new_gist');
552 547 });
553 548 Mousetrap.bind(['n r'], function(e) {
554 549 window.location = pyroutes.url('new_repo');
555 550 });
556 551
557 552 % if hasattr(c, 'repo_name') and hasattr(c, 'rhodecode_db_repo'):
558 553 // nav in repo context
559 554 Mousetrap.bind(['g s'], function(e) {
560 555 window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
561 556 });
562 557 Mousetrap.bind(['g c'], function(e) {
563 558 window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
564 559 });
565 560 Mousetrap.bind(['g F'], function(e) {
566 561 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': '', 'search': '1'});
567 562 });
568 563 Mousetrap.bind(['g f'], function(e) {
569 564 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': ''});
570 565 });
571 566 Mousetrap.bind(['g p'], function(e) {
572 567 window.location = pyroutes.url('pullrequest_show_all', {'repo_name': REPO_NAME});
573 568 });
574 569 Mousetrap.bind(['g o'], function(e) {
575 570 window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
576 571 });
577 572 Mousetrap.bind(['g O'], function(e) {
578 573 window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
579 574 });
580 575 % endif
581 576
582 577 </script>
583 578 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
584 579 </%def>
585 580
586 581 <div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
587 582 <div class="modal-dialog">
588 583 <div class="modal-content">
589 584 <div class="modal-header">
590 585 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
591 586 <h4 class="modal-title" id="myModalLabel">${_('Keyboard shortcuts')}</h4>
592 587 </div>
593 588 <div class="modal-body">
594 589 <div class="block-left">
595 590 <table class="keyboard-mappings">
596 591 <tbody>
597 592 <tr>
598 593 <th></th>
599 594 <th>${_('Site-wide shortcuts')}</th>
600 595 </tr>
601 596 <%
602 597 elems = [
603 598 ('/', 'Open quick search box'),
604 599 ('g h', 'Goto home page'),
605 600 ('g g', 'Goto my private gists page'),
606 601 ('g G', 'Goto my public gists page'),
607 602 ('n r', 'New repository page'),
608 603 ('n g', 'New gist page'),
609 604 ]
610 605 %>
611 606 %for key, desc in elems:
612 607 <tr>
613 608 <td class="keys">
614 609 <span class="key tag">${key}</span>
615 610 </td>
616 611 <td>${desc}</td>
617 612 </tr>
618 613 %endfor
619 614 </tbody>
620 615 </table>
621 616 </div>
622 617 <div class="block-left">
623 618 <table class="keyboard-mappings">
624 619 <tbody>
625 620 <tr>
626 621 <th></th>
627 622 <th>${_('Repositories')}</th>
628 623 </tr>
629 624 <%
630 625 elems = [
631 626 ('g s', 'Goto summary page'),
632 627 ('g c', 'Goto changelog page'),
633 628 ('g f', 'Goto files page'),
634 629 ('g F', 'Goto files page with file search activated'),
635 630 ('g p', 'Goto pull requests page'),
636 631 ('g o', 'Goto repository settings'),
637 632 ('g O', 'Goto repository permissions settings'),
638 633 ]
639 634 %>
640 635 %for key, desc in elems:
641 636 <tr>
642 637 <td class="keys">
643 638 <span class="key tag">${key}</span>
644 639 </td>
645 640 <td>${desc}</td>
646 641 </tr>
647 642 %endfor
648 643 </tbody>
649 644 </table>
650 645 </div>
651 646 </div>
652 647 <div class="modal-footer">
653 648 </div>
654 649 </div><!-- /.modal-content -->
655 650 </div><!-- /.modal-dialog -->
656 651 </div><!-- /.modal -->
@@ -1,77 +1,76 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.html"/>
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.url('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 <div class="left-column">
28 28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 29 </div>
30 30 <%block name="above_login_button" />
31 31 <div id="login" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 32 <!-- login -->
34 33 <div class="sign-in-title">
35 34 <h1>${_('Sign In')}</h1>
36 35 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
37 36 <h4>${h.link_to(_("Go to the registration page to create a new account."), request.route_path('register'))}</h4>
38 37 %endif
39 38 </div>
40 39 <div class="inner form">
41 40 ${h.form(request.route_path('login', _query={'came_from': came_from}), needs_csrf_token=False)}
42 41
43 42 <label for="username">${_('Username')}:</label>
44 43 ${h.text('username', class_='focus', value=defaults.get('username'))}
45 44 %if 'username' in errors:
46 45 <span class="error-message">${errors.get('username')}</span>
47 46 <br />
48 47 %endif
49 48
50 49 <label for="password">${_('Password')}:</label>
51 50 ${h.password('password', class_='focus')}
52 51 %if 'password' in errors:
53 52 <span class="error-message">${errors.get('password')}</span>
54 53 <br />
55 54 %endif
56 55
57 56 ${h.checkbox('remember', value=True, checked=defaults.get('remember'))}
58 57 <label class="checkbox" for="remember">${_('Remember me')}</label>
59 58
60 59 <p class="links">
61 60 ${h.link_to(_('Forgot your password?'), h.route_path('reset_password'))}
62 61 </p>
63 62
64 63 ${h.submit('sign_in', _('Sign In'), class_="btn sign-in")}
65 64
66 65 ${h.end_form()}
67 66 <script type="text/javascript">
68 67 $(document).ready(function(){
69 68 $('#username').focus();
70 69 })
71 70 </script>
72 71 </div>
73 72 <!-- end login -->
74 73 <%block name="below_login_button" />
75 74 </div>
76 75 </div>
77 76 </div>
@@ -1,78 +1,77 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.html"/>
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.url('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 <div class="left-column">
28 28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 29 </div>
30 30
31 31 <div id="register" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 32 <!-- login -->
34 33 <div class="sign-in-title">
35 34 <h1>${_('Reset your Password')}</h1>
36 35 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
37 36 </div>
38 37 <div class="inner form">
39 38 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
40 39 <label for="email">${_('Email Address')}:</label>
41 40 ${h.text('email', defaults.get('email'))}
42 41 %if 'email' in errors:
43 42 <span class="error-message">${errors.get('email')}</span>
44 43 <br />
45 44 %endif
46 45
47 46 %if captcha_active:
48 47 <div class="login-captcha"
49 48 <label for="email">${_('Captcha')}:</label>
50 49 ${h.hidden('recaptcha_field')}
51 50 <div id="recaptcha"></div>
52 51 %if 'recaptcha_field' in errors:
53 52 <span class="error-message">${errors.get('recaptcha_field')}</span>
54 53 <br />
55 54 %endif
56 55 </div>
57 56 %endif
58 57
59 58 ${h.submit('send', _('Send password reset email'), class_="btn sign-in")}
60 59 <div class="activation_msg">${_('Password reset link will be sent to matching email address')}</div>
61 60
62 61 ${h.end_form()}
63 62 </div>
64 63 </div>
65 64 </div>
66 65 </div>
67 66
68 67 %if captcha_active:
69 68 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
70 69 %endif
71 70 <script type="text/javascript">
72 71 $(document).ready(function(){
73 72 $('#email').focus();
74 73 %if captcha_active:
75 74 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
76 75 %endif
77 76 });
78 77 </script>
@@ -1,123 +1,122 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.html"/>
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.url('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 <div class="left-column">
28 28 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
29 29 </div>
30 30 <%block name="above_register_button" />
31 31 <div id="register" class="right-column">
32 <%include file="/base/flash_msg.html"/>
33 32 <!-- login -->
34 33 <div class="sign-in-title">
35 34 <h1>${_('Create an account')}</h1>
36 35 <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4>
37 36 </div>
38 37 <div class="inner form">
39 38 ${h.form(request.route_path('register'), needs_csrf_token=False)}
40 39
41 40 <label for="username">${_('Username')}:</label>
42 41 ${h.text('username', defaults.get('username'))}
43 42 %if 'username' in errors:
44 43 <span class="error-message">${errors.get('username')}</span>
45 44 <br />
46 45 %endif
47 46
48 47 <label for="password">${_('Password')}:</label>
49 48 ${h.password('password', defaults.get('password'))}
50 49 %if 'password' in errors:
51 50 <span class="error-message">${errors.get('password')}</span>
52 51 <br />
53 52 %endif
54 53
55 54 <label for="password_confirmation">${_('Re-enter password')}:</label>
56 55 ${h.password('password_confirmation', defaults.get('password_confirmation'))}
57 56 %if 'password_confirmation' in errors:
58 57 <span class="error-message">${errors.get('password_confirmation')}</span>
59 58 <br />
60 59 %endif
61 60
62 61 <label for="firstname">${_('First Name')}:</label>
63 62 ${h.text('firstname', defaults.get('firstname'))}
64 63 %if 'firstname' in errors:
65 64 <span class="error-message">${errors.get('firstname')}</span>
66 65 <br />
67 66 %endif
68 67
69 68 <label for="lastname">${_('Last Name')}:</label>
70 69 ${h.text('lastname', defaults.get('lastname'))}
71 70 %if 'lastname' in errors:
72 71 <span class="error-message">${errors.get('lastname')}</span>
73 72 <br />
74 73 %endif
75 74
76 75 <label for="email">${_('Email')}:</label>
77 76 ${h.text('email', defaults.get('email'))}
78 77 %if 'email' in errors:
79 78 <span class="error-message">${errors.get('email')}</span>
80 79 <br />
81 80 %endif
82 81
83 82 %if captcha_active:
84 83 <div>
85 84 <label for="recaptcha">${_('Captcha')}:</label>
86 85 ${h.hidden('recaptcha_field')}
87 86 <div id="recaptcha"></div>
88 87 %if 'recaptcha_field' in errors:
89 88 <span class="error-message">${errors.get('recaptcha_field')}</span>
90 89 <br />
91 90 %endif
92 91 </div>
93 92 %endif
94 93
95 94 %if not auto_active:
96 95 <p class="activation_msg">
97 96 ${_('Account activation requires admin approval.')}
98 97 </p>
99 98 %endif
100 99 <p class="register_message">
101 100 ${register_message|n}
102 101 </p>
103 102
104 103 ${h.submit('sign_up',_('Create Account'),class_="btn sign-in")}
105 104
106 105 ${h.end_form()}
107 106 </div>
108 107 <%block name="below_register_button" />
109 108 </div>
110 109 </div>
111 110 </div>
112 111
113 112 %if captcha_active:
114 113 <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
115 114 %endif
116 115 <script type="text/javascript">
117 116 $(document).ready(function(){
118 117 $('#username').focus();
119 118 %if captcha_active:
120 119 Recaptcha.create("${captcha_public_key}", "recaptcha", {theme: "white"});
121 120 %endif
122 121 });
123 122 </script>
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now