# for privacy, reload the page after (default) 5 minutes
refresh_time = ctx.register.settings.refresh_timeout || 300;
-ctx.refresh = refresh_time _ '; ' _ ctx.opac_root _ '/home';
+ctx.refresh = refresh_time _ '; ' _ 'https://www.kcls.org';
# some useful variables and MACROs for display,
# field validation, and added info display
[% IF ctx.register.success %]
<h2>[% l('Registration successful!') %]<h3>
- <h3>[% l('Please see library staff to complete your registration.') %]</h4>
+ <p>
+ To fully activate your card you will need to visit a KCLS library
+ with proof of address and photo ID that shows your date of
+ birth. Parents/guardians can assist with proof of address for full
+ activation for applicants under 18. Find a list of the documents
+ you may use to provide proof of address on our
+ <a href='https://www.kcls.org/usingthelibrary/card/applications/KCLS%20600%20ENG.pdf'>
+ downloadable application.
+ </a>
+ </p>
+ <br/>
<div>
- <button onclick="location.href='https://kcls.bibliocms.com/'">
- Return to KCLS
- </button>
+ You will be automatically redirected to
+ <a href="https://www.kcls.org">www.kcls.org</a>...
</div>
<hr/>
- [% END %]
-
- <!--DO WE NEED THIS?
- <ul>
- <li>
- To fully activate your card you will need to visit a KCLS
- library with proof of address and photo ID that shows your
- date of birth. Parents/guardians can assist with proof of
- address for full activation for applicants under 18. Find a
- list of the documents you may use to provide proof of address
- on our
- <a href="https://www.kcls.org/usingthelibrary/card/applications/KCLS%20600%20ENG.pdf">
- downloadable application.</a>
- </li>
- <li>
- Want your card right away? Apply in person at any
- <a href="https://www.kcls.org/usingthelibrary/locations/">KCLS library.</a>
- In-person applicants can also choose from more card
- designs, while supplies last.
- </li>
- </ul>
- -->
+ <input type='hidden' id='register-success' value='yep'/>
+ [% ELSE %]
<form method='POST' onsubmit="return onsub()">
<ul>
</li>
</ul>
</form>
+ [% END # IF ctx.success %]
</div>
</div>
'stgba.post_code',
];
-var copy_addr_fields = ['street1','street2','city','state','post_code'];
+var last_activity = new Date();
+var activity_timeout = 30000; // 30 seconds
+var post_success_timeout = 15000; // 15 seconds
+var timeout_redirect = 'https://www.kcls.org';
/* show/hide card options depending on the selected type. */
function show_card_types(type) {
+ last_activity = new Date();
var wal = document.getElementById('wallet-cards');
var key = document.getElementById('keychain-cards');
if (type == 'wallet') {
}
function validate(dom_id) {
+ last_activity = new Date();
var element = document.getElementById(dom_id);
var value = element ? element.value : '';
var valid = true;
return true;
}
+function activity_checker_thread() {
+ var start = last_activity.getTime();
+ var end = new Date().getTime();
+ var diff = end - start;
+
+ var timeout =
+ document.getElementById('register-success') ?
+ post_success_timeout : activity_timeout;
+
+ console.debug('checking activity timeout=' +
+ timeout + ' : time range (ms) = ' + diff);
+
+ if (diff > timeout) {
+ location.href = timeout_redirect;
+ return;
+ }
+
+ setTimeout(activity_checker_thread, 2000);
+}
+
+
+activity_checker_thread();