source: WAeUP_SRP/trunk/skins/waeup_custom/logged_in.pt @ 523

Last change on this file since 523 was 521, checked in by joachim, 18 years ago

=make login work

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1<metal:html>
2
3<metal:body use-macro="here/main_template/macros/master">
4   
5    <metal:main fill-slot="main"
6                tal:define="p_props here/portal_properties;">
7      <metal:skin tal:condition="exists: here/portal_skins | nothing">
8        <div tal:condition="here/portal_skins/updateSkinCookie | nothing"
9             tal:define="dummy here/setupCurrentSkin">
10        </div>
11      </metal:skin>
12      <tal:block condition="isAnon">
13        <tal:block define="dummy python:request.RESPONSE.expireCookie('__ac',path='/')" />
14          <h1 i18n:translate="heading_login_failure">Login failure</h1>
15          <p>
16            <span i18n:translate="description_login_failure">
17              You are not currently logged in. Your username and or password may be
18              incorrect. Your browser may also not be configured to accept HTTP
19              cookies. If you need help please contact
20            </span>
21            <a href="mailto:admin@here.com" title="Email Admin"
22               tal:attributes="href string:mailto:${p_props/email_from_address}"
23               tal:content="p_props/email_from_address">Email Admin</a>.
24          </p>
25          <p i18n:translate="">
26            help_password_forgotten
27            <tal:block i18n:name="link_password_forgotten"
28                       replace="string:${base_url}account_lost_password_form"/>
29          </p>
30          <p>
31            or <a href="" tal:attributes="href string:${base_url}check_admission">check your admission status</a>
32          </p>
33        </tal:block><!-- isAnon -->
34
35        <tal:block condition="not: isAnon"
36                   define="first_time python:(member.getProperty('login_time', None) ==
37                   here.ZopeTime('2000/01/01'));"
38                   >
39          <span tal:condition="first_time"
40              tal:define="dummy python: context.process_waeup_login(member=member,sc_pin=request.get('sc_pin',None))" />
41          <tal:block condition="nothing">
42            <div tal:define="now here/ZopeTime;
43            dum_reg python:member.setProperties(last_login_time=now,
44            login_time=now)" />
45           
46            <h1>Welcome!</h1>
47            <p>This is the first time that you've logged in to <span
48                                                                   replace="p_props/title">Here</span>. Before you start exploring you need
49              to change your original password. This will ensure that the password we
50            sent you via email cannot be used in a malicious manner.</p>
51           
52            <p>Please use the form below to change your password.</p>
53
54      <form action="change_password" method="post"
55            tal:attributes="action string:${base_url}change_password">
56        <input type="hidden" name="user" value=""
57               tal:attributes="value member" />
58        <input type="hidden" name="domains:tokens" value="" />
59        <input type="hidden" name="redirect" value=""
60               tal:attributes="value base_url" />
61
62      <table border="1" width="100%" cellspacing="1" cellpadding="1">
63
64       <tr valign="top" align="left">
65         <th>Username</th>
66         <td><span tal:replace="member">You</span></td>
67       </tr>
68
69       <tr valign="top" align="left">
70         <th>New password</th>
71         <td><input type="password" name="password" /></td>
72       </tr>
73
74       <tr valign="top" align="left">
75        <th>Confirm new password</th>
76        <td><input type="password" name="confirm" /></td>
77       </tr>
78
79       <tr>
80        <td></td>
81        <td>
82          <input type="submit" class="standalone" value="Change password" />
83        </td>
84       </tr>
85
86      </table>
87
88      </form>
89
90    </tal:block><!-- first_time -->
91
92    <tal:block condition="not: first_time">
93
94      <tal:block define="d_reg python:member.setProperties(
95                                      last_login_time=member.getProperty('login_time', None));
96                         ereg python:member.setProperties(
97                                     login_time=here.ZopeTime());
98                      "/>
99
100      <div tal:condition="request/came_from | nothing ">
101        <div tal:define="came_from python:request.get('came_from');
102                         response request/RESPONSE;
103                         dredirect python: response.redirect(came_from);
104                        " />
105      </div>
106
107      <h1 i18n:translate="heading_login_success">Login success</h1>
108      <p i18n:translate="description_login_success">
109         Welcome. You are currently logged in.
110      </p>
111
112   </tal:block><!-- not first_time -->
113
114  </tal:block><!-- not isAnon -->
115
116</metal:main>
117
118</metal:body>
119
120</metal:html>
Note: See TracBrowser for help on using the repository browser.