login form cleanup and implementation of login-failure handling; more to come
authorBill Erickson <erickson@esilibrary.com>
Thu, 10 Feb 2011 17:25:29 +0000 (12:25 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 20 Jul 2011 18:31:14 +0000 (14:31 -0400)
Open-ILS/web/templates/default/opac/parts/login/form.tt2

index 4c4b768..f9ea7b7 100644 (file)
@@ -1,5 +1,4 @@
 <!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
-
 <div class="hide_me">
        <div class='login_text color_1' style='padding: 4px; text-align: center;'>
                <span>[% l("Login") %]</span>
     </tbody>
 </table>
 
+
 <span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
 <span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
 <span id='pw_not_strong' class='hide_me'>
     [% l("The password provided is not strong enough.") %]
-    [% 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.") %]
+    [% 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.") %]
 </span>
-<span id='patron_card_inactive_alert' class='hide_me'>[% l("The barcode used to login is marked as inactive.  Please contact your local library.") %]</span>
-<span id='patron_inactive_alert' class='hide_me'>[% l("This account has been deactivated.  Please contact your local library.") %]</span>
-<span id='patron_login_failed' class='hide_me'>[% l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.") %]</span>
 
  ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
 
-[% IF ctx.login_failed_event %]
-<div id='login-failed-message'>
-[%
+
+[% IF ctx.login_failed_event;
     IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
         l("The barcode used to login is marked as inactive.  Please contact your local library.");
     ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
         l("This account has been deactivated.  Please contact your local library.");
     ELSE;
-        l("Login failed. The username or password provided was not valid.  
-            Ensure Caps-Lock is off and try again or contact your local library.");
+        l("Login failed. The username or password provided was not valid.  Ensure Caps-Lock is off and try again or contact your local library.");
     END;
-%]
-</div>
-[% END %]
+END %]
 
 <div>
     <div style="height:20px;"></div>
-    <form id='login_form' method='POST'>
+    <form method='POST'>
         <table cellpadding="0" cellspacing="0" border="0">
             <tr>
                 <td valign="top" width="676" class="login_boxes left_brain">
                         </tr>
                         <tr>
                             <td width="42%" class="lbl1">
-                                Library Card Number or Username<br />
+                                [% l('Library Card Number or Username') %]
+                                <br />
                                 <span class="lbl2">
-                                    Please include leading zeros and no spaces.
-                                    <br /> Example: 0026626051</span>
+                                    [% l('Please include leading zeros and no spaces.') %]
+                                    <br/>
+                                    [% l('Example: 0026626051') %]
+                                </span>
                                 <br /><br />
                             </td>
                             <td width="58%" valign="top">
                                 <div class="input_bg">
-                                    <input type="text" name="username"
-                                        id="login_username" />
+                                    <input type="text" name="username"/>
                                 </div>
                             </td>
                         </tr>
                             <td valign="top" class="lbl1">
                                 [% l('PIN Number or Password') %]<br />
                                 <span class="lbl2">
-                                    [% | l('<br/>', '<br/>') %]
-                                       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
-                                    [% END %]
+                                    [% l('If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926', '<br/>', '<br/>') %]
                                 </span>
                             </td>
                             <td valign="top">
                                 <div class="input_bg">
-                                    <input name="password" type="password" id="login_password" />
+                                    <input name="password" type="password" />
                                 </div>
                                 <div style="padding-top:7px;">
                                     [%
                     <br /><br />
                 </td>
                    <td><div style="width:10px;"></div></td>
-                <td class="login_boxes right_brain" align="center"
-                    valign="top" width="291">
-                    <a href="http://www.kcls.org/about/contact/"><img
-                        src="[% ctx.media_prefix %]/images/questions.png"
-                        alt="Questions?" style="margin-top:29px;" /></a>
+                <td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+                    <a href="http://www.kcls.org/about/contact/"><img 
+                        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
                        <div style="width:182px;color:black;padding:5px 25px;">
-                        Visit our FAQs section for answers to common questions
-                        about how to use your account.
+                        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
                        </div>
+
                     <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
-                        alt="FAQs" src="[% ctx.media_prefix %]/images/faqs-btn.png"
-                        style="margin-top:13px;" /></a>
+                        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
                    </td>
             </tr>
         </table>
     </form>
     <div class="clear-both"></div>
 </div>
-<!-- ****************** end: login.xml ***************************** -->