Repaired merge conflicts resuling from ttopac-move-templates
[working/Evergreen.git] / Open-ILS / src / templates / default / opac / parts / login / form.tt2
1 <!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
2
3 <div class="hide_me">
4         <div class='login_text color_1' style='padding: 4px; text-align: center;'>
5                 <span>[% l("Login") %]</span>
6         </div>
7         <br/>
8 </div>
9 <div class="hide_me" id="forget_pw">
10     <h1>Password Reset</h1>
11         Username or Barcode<br />
12         <input type="text" id="forget_pw_user" /><br /><br />
13         Email Address on account<br />
14         <input type="text" id="forget_pw_email" /><br />
15     <a href="#">Submit</a> &nbsp;
16     <a href="#">Cancel</a>
17 </div>
18 <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
19         <thead>
20         <tr><td colspan='2' align='center'><b>[% l("Password") %]</b></td></tr>
21     </thead>
22     <tbody>
23         <tr>
24             <td colspan='2' style='padding:10px;'>
25                 [% l("This appears to be the first time you have logged in.  You will need to change your password.") %]
26                 [% l("The password must be at least 7 characters in length,
27  contain at least one letter (a-z/A-Z),
28  and contain at least one number.") %]
29             </td>
30         </tr>
31         <tr>
32             <td>[% l("Enter your current password") %]</td>
33             <td><input type='password' id='change_pw_current'/></td>
34         </tr>
35         <tr>
36             <td>[% l("Enter the new password") %]</td>
37             <td><input type='password' id='change_pw_1'/></td>
38         </tr>
39         <tr>
40             <td>[% l("Re-type the new password for verification") %]</td>
41             <td><input type='password' id='change_pw_2'/></td>
42         </tr>
43         <tr><td><br/></td><td/></tr>
44         <tr class='color_1'>
45             <td colspan='2' align='center'>
46                 <span class='login_text' style='margin-right: 20px;'>
47                     <input type='submit' value='[% l("Update Password") %]'  id='change_pw_button'/>
48                 </span>
49             </td>
50         </tr>
51     </tbody>
52 </table>
53
54
55 <span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
56 <span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
57 <span id='pw_not_strong' class='hide_me'>
58     [% l("The password provided is not strong enough.") %]
59     [% l("The password must be at least 7 characters in length, contain at least one letter (a-z/A-Z), and contain at least one number.") %]
60 </span>
61
62  ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
63
64 [% IF ctx.login_failed_event %]
65 <div id='login-failed-message'>
66 [%
67     IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
68         l("The barcode used to login is marked as inactive.  Please contact your local library.");
69     ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
70         l("This account has been deactivated.  Please contact your local library.");
71     ELSE;
72         l("Login failed. The username or password provided was not valid.  
73             Ensure Caps-Lock is off and try again or contact your local library.");
74     END;
75 %]
76 </div>
77 [% END %]
78
79 <div>
80     <div style="height:20px;"></div>
81     <form method='POST'>
82         <table cellpadding="0" cellspacing="0" border="0">
83             <tr>
84                 <td valign="top" width="676" class="login_boxes left_brain">
85                     <table cellpadding="0" cellspacing="0" border="0"
86                         width="100%">
87                         <tr>
88                                 <td colspan="2" style="padding-bottom: 10px;">
89                                 <h1>[% l('Log in to Your Account') %]</h1>
90                                 [% l('Please enter the following information:') %]
91                                 <br /><br />
92                             </td>
93                         </tr>
94                         <tr>
95                             <td width="42%" class="lbl1">
96                                 [% l('Library Card Number or Username') %]
97                                 <br />
98                                 <span class="lbl2">
99                                     [% l('Please include leading zeros and no spaces.') %]
100                                     <br/>
101                                     [% l('Example: 0026626051') %]
102                                 </span>
103                                 <br /><br />
104                             </td>
105                             <td width="58%" valign="top">
106                                 <div class="input_bg">
107                                     <input type="text" id="username_field" name="username"/>
108                                 </div>
109                             </td>
110                         </tr>
111                         <tr>
112                             <td colspan="2">
113                                 <div style="height:15px;"></div>
114                             </td>
115                         </tr>
116                         <tr>
117                             <td valign="top" class="lbl1">
118                                 [% l('PIN Number or Password') %]<br />
119                                 [% INCLUDE "default/opac/parts/login/password_hint.tt2" %]
120                             </td>
121                             <td valign="top">
122                                 <div class="input_bg">
123                                     <input name="password" type="password" />
124                                 </div>
125                                 <div style="padding-top:7px;">
126                                     [%
127                                         # If no redirect is offered or it's leading us back to the 
128                                         # login form, redirect the user to My Account
129                                         redirect = CGI.param('redirect_to') || ctx.referer;
130                                         IF !redirect OR redirect.match(ctx.path_info _ '$');
131                                             redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
132                                         END;
133                                         redirect = redirect  | replace('^http:', 'https:');
134                                     %]
135                                     <input type='hidden' name='redirect_to' value='[% redirect %]'/>
136                                     <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
137                                 </div>
138                                 <div style="padding-top:14px;">
139                                     <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
140                                     <!-- TODO
141                                     <a href="reset_password"
142                                         style="position:relative;top:-13px;left:2px;font-size:10px;">Forgot your PIN?</a>
143                                     -->
144                                 </div>
145                                 </td>
146                         </tr>
147                     </table>
148                     <br /><br />
149                 </td>
150                     <td><div style="width:10px;"></div></td>
151                 [% INCLUDE "default/opac/parts/login/help.tt2" %]
152             </tr>
153         </table>
154     </form>
155     <div class="clear-both"></div>
156 </div>