JBAS-1665 Self-reg docs on success page; raise suc. timeout
authorBill Erickson <berickxx@gmail.com>
Thu, 19 Jan 2017 21:53:05 +0000 (16:53 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/openils/var/templates_kcls/opac/register.tt2
Open-ILS/web/js/ui/default/opac/register.js

index fbd94ca..e2094aa 100644 (file)
@@ -78,6 +78,7 @@ END; # input_field()
       src="[% ctx.media_prefix %]/js/ui/default/opac/register.js"></script>
     <script>
       var timeout_redirect = '[% complete_url | html %]';
+      var post_success_timeout = '[% kiosk ? 300000 : 30000 %]';
     </script>
 
 <style>
@@ -169,7 +170,7 @@ END; # input_field()
 .mailing-address-hidden {
   display:none;
 }
-#submit-another {
+#submit-another, #exit {
   background-color: #02729e;
   color: white;
 }
@@ -219,11 +220,56 @@ END; # input_field()
       <br/>
       <br/>
       <div class='success-minus-2'>
-        You will be automatically redirected to 
-        <a href="[% complete_url | html %]">[% complete_url | html %]</a>...
+        [% IF kiosk %]
+          <a href="[% complete_url | html %]">
+            <button id="exit">Exit and Return</button></a>
+        [% ELSE %]
+          You will be automatically redirected to 
+          <a href="[% complete_url | html %]">[% complete_url | html %]</a>...
+        [% END %]
       </div>
       <hr/>
       <input type='hidden' id='register-success' value='yep'/>
+      [% IF kiosk %]
+        <h3>Verification Requirements</h3>
+
+        <p>
+        1. Photo identification with birth date (one piece required for adults).
+        Acceptable examples are as follows and may be current or expired:
+        </p>
+        <ul>
+          <li>Driver’s License</li>
+          <li>Passport</li>
+          <li>Washington ID Card</li>
+          <li>U.S. Military ID</li>
+          <li>Matricula Consular (issued by Mexican government)</li>
+        </ul>
+        <br/>
+
+        <p>
+        2. Address verification matching qualifying residential address and given name
+        (one piece required for adults and minors).
+        Acceptable examples–chosen document must be current:
+        </p>
+
+        <ul>
+          <li>Washington Driver’s License</li>
+          <li>Washington ID Card</li>
+          <li>Printed Checks</li>
+          <li>Utility Bill (printout of online bill acceptable)</li>
+          <li>Apartment Lease</li>
+          <li>Voter’s Registration</li>
+          <li>King County Tax Bill</li>
+          <li>Other (Must be of a legal or permanent nature)</li>
+        </ul>
+
+        <p>
+        If residence address differs from mailing address, the residence address determines patron eligibility.
+        You may get a library card today without address verification, but you will be limited to checking
+        out 2 items. If you do not bring address verification, the card will expire after 90 days.
+        </p>
+      [% END %]
+
     [% ELSE %]
 
     <form method='POST' onsubmit="return onsub()">
@@ -548,11 +594,12 @@ END; # input_field()
         <li>
           <div class="grid">
             <div class="grid-cell">
-              <input type="submit" value="[% l('Submit Registration') %]"/>
+              <input type="submit" id='main-submit' 
+                value="[% l('Submit Registration') %]"/>
             </div>
             <div class="grid-cell">
               <button onclick="location.href='[% complete_url | html %]'; return false">
-                Cancel and Return to KCLS
+                Cancel and Return
               </button>
             </div>
           </div>
@@ -563,46 +610,7 @@ END; # input_field()
     [% END # IF ctx.success %]
     </div><!-- main-content-left -->
     <div id='main-content-right'>
-    [% IF kiosk %]
-      <h3>Verification Requirements</h3>
-
-      <p>
-      1. Photo identification with birth date (one piece required for adults).
-      Acceptable examples are as follows and may be current or expired:
-      </p>
-      <ul>
-        <li>Driver’s License</li>
-        <li>Passport</li>
-        <li>Washington ID Card</li>
-        <li>U.S. Military ID</li>
-        <li>Matricula Consular (issued by Mexican government)</li>
-      </ul>
-      <br/>
-
-      <p>
-      2. Address verification matching qualifying residential address and given name
-      (one piece required for adults and minors).
-      Acceptable examples–chosen document must be current:
-      </p>
-
-      <ul>
-        <li>Washington Driver’s License</li>
-        <li>Washington ID Card</li>
-        <li>Printed Checks</li>
-        <li>Utility Bill (printout of online bill acceptable)</li>
-        <li>Apartment Lease</li>
-        <li>Voter’s Registration</li>
-        <li>King County Tax Bill</li>
-        <li>Other (Must be of a legal or permanent nature)</li>
-      </ul>
-
-      <p>
-      If residence address differs from mailing address, the residence address determines patron eligibility.
-      You may get a library card today without address verification, but you will be limited to checking
-      out 2 items. If you do not bring address verification, the card will expire after 90 days.
-      </p>
-
-    [% ELSE %] <!-- KIOSK -->
+    [% UNLESS kiosk %]
       <h3>
         <a class="blue-link"
           href='http://kcls.bibliocms.com/faq/library-cards/'>Related FAQs</a>
@@ -691,7 +699,7 @@ END; # input_field()
           <a href='https://kcls.bibliocommons.com/info/privacy'>Privacy Policy</a>.
         </li>
       </ul>
-    [% END %]
+    [% END %]<!-- UNLESS kiosk -->
     </div>
     <div class="grid-clear"></div>
   </div>
index 4d8c78c..87cfb3a 100644 (file)
@@ -18,12 +18,13 @@ var required_fields = [
 
 var last_activity = new Date();
 var activity_timeout = 300000;  // 300 seconds
-var post_success_timeout = 30000; // 15 seconds
 var phone_regex = new RegExp(/^\d{3}-\d{3}-\d{4}/);
 var post_regex = new RegExp(/^\d{5}(?:[-\s]\d{4})?$/);
 
 // Loaded from the template to pick up return-to URL option.
 // var timeout_redirect = 'https://www.kcls.org';
+// Loaded from the template / longer in kiosk mode
+// var post_success_timeout = 30000; 
 
 /* show/hide card options depending on the selected type. */
 function show_card_types(type) {