Mercurial > kallithea
annotate rhodecode/templates/login.html @ 3625:260a7a01b054 beta
follow Python conventions for boolean values
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Mar 2013 01:10:45 +0100 |
parents | 1f334a68d057 |
children | 3563bb7b4b82 |
rev | line source |
---|---|
186
556473ba0399
fixed menu in home page, and added login html with forms that validates username and password.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
2 <%inherit file="base/root.html"/> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
3 |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
4 <%def name="title()"> |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3422
diff
changeset
|
5 ${_('Log In')} · ${c.rhodecode_name} |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
6 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
7 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
8 <div id="login"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
9 <div class="flash_msg"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
10 <% messages = h.flash.pop_messages() %> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
11 % if messages: |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
12 <ul id="flash-messages"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
13 % for message in messages: |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
14 <li class="${message.category}_msg">${message}</li> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
15 % endfor |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
16 </ul> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
17 % endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
18 </div> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
19 <!-- login --> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
20 <div class="title top-left-rounded-corner top-right-rounded-corner"> |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3422
diff
changeset
|
21 <h5>${_('Log In to %s') % c.rhodecode_name}</h5> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
22 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
23 <div class="inner"> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
24 ${h.form(h.url.current(came_from=c.came_from))} |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
25 <div class="form"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
26 <!-- fields --> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
27 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
28 <div class="fields"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
29 <div class="field"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
30 <div class="label"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
31 <label for="username">${_('Username')}:</label> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
32 </div> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
33 <div class="input"> |
3422
b5ce72167906
fixed login input sizes
Marcin Kuzminski <marcin@python-works.com>
parents:
3374
diff
changeset
|
34 ${h.text('username',class_='focus large')} |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
35 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
36 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
37 </div> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
38 <div class="field"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
39 <div class="label"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
40 <label for="password">${_('Password')}:</label> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
41 </div> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
42 <div class="input"> |
3422
b5ce72167906
fixed login input sizes
Marcin Kuzminski <marcin@python-works.com>
parents:
3374
diff
changeset
|
43 ${h.password('password',class_='focus large')} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
44 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
45 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
46 </div> |
1802
145677a36675
Remember Me option on login
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1472
diff
changeset
|
47 <div class="field"> |
145677a36675
Remember Me option on login
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1472
diff
changeset
|
48 <div class="checkbox"> |
145677a36675
Remember Me option on login
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1472
diff
changeset
|
49 <input type="checkbox" id="remember" name="remember" /> |
1804
eb4b755fc6a2
Wrap remember me in translation function
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1802
diff
changeset
|
50 <label for="remember">${_('Remember me')}</label> |
1802
145677a36675
Remember Me option on login
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1472
diff
changeset
|
51 </div> |
145677a36675
Remember Me option on login
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1472
diff
changeset
|
52 </div> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
53 <div class="buttons"> |
2607
7ae36df760ce
removed deprecated ui-button
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
54 ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")} |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
55 </div> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
56 </div> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
57 <!-- end fields --> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
58 <!-- links --> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
59 <div class="links"> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
60 ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))} |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
61 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1804
diff
changeset
|
62 / |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
63 ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
64 %endif |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
65 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
66 |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
67 <!-- end links --> |
186
556473ba0399
fixed menu in home page, and added login html with forms that validates username and password.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
68 </div> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
69 ${h.end_form()} |
1202
eef9e273347a
added focus to login register password reminder forms
Marcin Kuzminski <marcin@python-works.com>
parents:
1157
diff
changeset
|
70 <script type="text/javascript"> |
eef9e273347a
added focus to login register password reminder forms
Marcin Kuzminski <marcin@python-works.com>
parents:
1157
diff
changeset
|
71 YUE.onDOMReady(function(){ |
3197 | 72 YUD.get('username').focus(); |
1202
eef9e273347a
added focus to login register password reminder forms
Marcin Kuzminski <marcin@python-works.com>
parents:
1157
diff
changeset
|
73 }) |
eef9e273347a
added focus to login register password reminder forms
Marcin Kuzminski <marcin@python-works.com>
parents:
1157
diff
changeset
|
74 </script> |
1157
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
75 </div> |
41241617a7a3
rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
1156
diff
changeset
|
76 <!-- end login --> |
1472
aaec08ad9daf
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1202
diff
changeset
|
77 </div> |