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