source: WAeUP_CMS/trunk/skins/WAEUP/login_form.cpt @ 7444

Last change on this file since 7444 was 44, checked in by Henrik Bettermann, 19 years ago
File size: 6.6 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
2      metal:use-macro="here/main_template/macros/master"
3      i18n:domain="plone">
4
5<head>
6    <script type="text/javascript" metal:fill-slot="javascript_head_slot">
7    </script>
8    <metal:block fill-slot="top_slot"
9                 tal:define="dummy python:request.set('disable_border',1)" />
10</head>
11
12<body>
13
14<div metal:fill-slot="main"
15     tal:define="auth nocall:here/cookie_authentication|nothing;
16                 came_from request/came_from|request/HTTP_REFERER|nothing;
17                 came_from python:test(utool.isURLInPortal(came_from), came_from, None);
18                 ztutils modules/ZTUtils;
19                 errors options/state/getErrors;">
20
21<h1 i18n:translate="heading_sign_in">Please log in</h1>
22
23<p i18n:translate="description_sign_in">
24To access this part of the site, you need to log in with your user name and password.
25</p>
26
27<p i18n:translate="description_no_account"
28   tal:define="join python:[a['url'] for a in actions['user'] if a['id']=='join']"
29   tal:condition="python: join and checkPermission('Add portal member', here)">
30
31If you do not have an account here, head over to the
32
33<span i18n:name="registration_form">
34    <a href=""
35       tal:define="join python:join.pop();
36                   join join;
37                   join python:join+test(join.find('?')==-1, '?', '&amp;')+ztutils.make_query(came_from=came_from);"
38       tal:attributes="href join"
39       i18n:translate="description_no_account_registration_linktext">
40        registration form
41    </a>
42</span>
43
44to become a member.
45
46</p>
47
48<div id="enable_cookies_message" i18n:translate="enable_cookies_message" class="portalMessage" style="display:none">
49  Cookies are not enabled. You must <span i18n:name="enable_cookies">
50  <a href="enabling_cookies" i18n:translate="label_enable_cookies">enable cookies</a></span> before you can log in.
51</div>
52
53<div tal:condition="python: not auth" i18n:translate="login_form_disabled">
54    While cookie authentication is disabled, cookie-based login is not available.
55</div>
56
57<form tal:attributes="action python:context.absolute_url()+'/'+template.id"
58      method="post"
59      id="login_form"
60      tal:condition="python:auth">
61
62    <fieldset tal:define="ac_name auth/name_cookie;
63                          ac_password auth/pw_cookie;
64                          ac_persist auth/persist_cookie;
65                          login_name python:request.get('login_name', request.get(ac_name, ''));">
66
67        <legend i18n:translate="legend_account_details">Account details</legend>
68
69        <input type="hidden"
70            name="came_from"
71            value=""
72            tal:attributes="value came_from" />
73
74        <input type="hidden" name="form.submitted" value="1" />
75        <input type="hidden" name="js_enabled" id="js_enabled" value="0" />
76        <input type="hidden" name="cookies_enabled" id="cookies_enabled" value="" />
77        <input type="hidden" name="login_name" id="login_name" value="" />
78        <input type="hidden" name="pwd_empty" id="pwd_empty" value="0" />
79
80        <div class="field"
81             tal:define="error python:errors.get(ac_name, None);"
82             tal:attributes="class python:test(error, 'field error', 'field')">
83
84            <label i18n:translate="label_login_name"
85                   tal:attributes="for ac_name">Login Name</label>
86
87            <div i18n:translate="help_login_name_caps"
88                 class="formHelp">
89                Login names are case sensitive, make sure the caps lock key is not enabled.
90            </div>
91
92            <div tal:content="error">Validation error output</div>
93
94            <input type="text"
95                   size="15"
96                   tabindex=""
97                   tal:attributes="name ac_name;
98                                   id ac_name;
99                                   value login_name;
100                                   tabindex tabindex/next;"
101                   />
102
103        </div>
104
105        <div class="field"
106             tal:define="error python:errors.get(ac_password, None);"
107             tal:attributes="class python:test(error, 'field error', 'field')">
108
109            <label i18n:translate="label_password"
110                   tal:attributes="for ac_password">Password</label>
111
112            <div class="formHelp">
113                <div i18n:translate="help_capslock_password">
114                    Case sensitive, make sure caps lock is not enabled.
115                </div>
116                <div tal:condition="python:checkPermission('Mail forgotten password', here)"
117                     i18n:translate="help_password_retrieval">
118                    If you have forgotten your password or would like to get a guest account, please send an e-mail to
119                    <span i18n:name="click_here">
120                        <a tal:replace="structure python: here.spamProtect(site_properties.email_from_address)" />
121                    </span>.
122                </div>
123            </div>
124
125            <div tal:content="error">Validation error output</div>
126
127            <input type="password"
128                   size="15"
129                   tabindex=""
130                   tal:attributes="name ac_password;
131                                   id ac_password;
132                                   tabindex tabindex/next;"
133                   />
134        </div>
135
136        <div class="field">
137
138            <input type="checkbox"
139                   class="noborder formRememberName"
140                   value="1"
141                   checked="checked"
142                   id="cb_remember"
143                   tabindex=""
144                   tal:attributes="name ac_persist;
145                                   tabindex tabindex/next;
146                                   checked python:request.get(ac_name, '') and 'checked' or None;"
147                   />
148
149            <label for="cb_remember" i18n:translate="label_remember_my_name">Remember my name.</label>
150
151            <div i18n:translate="help_remember_my_name"
152                 class="formHelp">
153                Check this to have your user name filled in automatically when you log in later.
154            </div>
155
156        </div>
157
158        <div class="formControls">
159
160            <input class="context"
161                   tabindex=""
162                   type="submit"
163                   name="submit"
164                   value="Log in"
165                   i18n:attributes="value label_log_in;"
166                   tal:attributes="tabindex tabindex/next;
167                                   onclick string:javascript:return setLoginVars('$ac_name','login_name','$ac_password','pwd_empty','js_enabled','cookies_enabled');"
168                   />
169
170        </div>
171
172        <p i18n:translate="remember_to_log_out">
173            Please log out or exit your browser when you're done.
174        </p>
175
176    </fieldset>
177
178</form>
179</div>
180
181</body>
182</html>
Note: See TracBrowser for help on using the repository browser.