# 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';
-
-# some useful variables and MACROs for display,
-# field validation, and added info display
-
-ctx_org = ctx.physical_loc || ctx.search_ou || ctx.aou_tree.id;
-
-# list of the registration fields to (potentially)
-# display in the order they should be shown
-
-# post_code is the only field below that is required in the database and
-# post_code is only required if an address is created.
-# To prevent any of these fields from showing locally, regardless org unit
-# settings, simply remove the fields from this list. In the case of
-# addresses, if all address fields are removed, no attempt at creating
-# an address will be made (and post_code will no longer be required).
-
-register_fields = [
- {class => 'stgu', name = 'first_given_name', label => l('First Name')},
- {class => 'stgu', name = 'second_given_name', label => l('Middle Name')},
- {class => 'stgu', name = 'family_name', label => l('Last Name')},
- {class => 'stgu', name = 'pref_first_given_name', label => l('Preferred First Name')},
- {class => 'stgu', name = 'pref_second_given_name', label => l('Preferred Middle Name')},
- {class => 'stgu', name = 'pref_family_name', label => l('Preferred Last Name')},
- {class => 'stgu', name = 'suffix', label => l('Suffix (Sr./Jr./III)')},
- {class => 'stgma', name = 'street1', label => l('Street Address')},
- {class => 'stgma', name = 'street2', label => l('Street Address (2)')},
- {class => 'stgma', name = 'city', label => l('City')},
- {class => 'stgma', name = 'county', label => l('County')},
- {class => 'stgma', name = 'state', label => l('State')},
- {class => 'stgma', name = 'post_code', label => l('Zip Code')},
- {class => 'stgu', name = 'dob', label => l('Date of Birth')},
- {class => 'stgu', name = 'day_phone', label => l('Phone Number')},
- {class => 'stgu', name = 'email', label => l('Email Address')}
-];
-
-# The dojo date widget in the patron edit UI only accepts default
-# values in ISO8601 format. It will not accept locale-shaped dates.
-IF !ctx.register.settings.stgu.dob.example;
- ctx.register.settings.stgu.dob.example = l('YYYY-MM-DD');
-END;
-
-%]
+-%]
<h2 class="sr-only">[% l('Account Registration') %]</h2>
<div id="content-wrapper">
<div id="main-content-register">
<div class="common-full-pad"></div>
- <h1>[% l('Request a Library Card')%]</h1>
- <hr/>
-
- [% IF ctx.register.success %]
- <h3>[% l('Registration successful!') %]<h3>
- <h4>[% l('Please see library staff to complete your registration.') %]</h4>
-
- [% IF ctx.register.username_taken %]
- <p>
- [% |l %]
- Note: The selected username may be in use by another patron.
- You may select another username when finalizing your
- registration or in the online catalog.
- [% END %]
- </p>
- [% END %]
-
- <br/>
- <p>
- <a href="[% ctx.opac_root %]/home"
- class="opac-button">[% l('Return to the Catalog') %]</a>
- </p>
-
- [% ELSIF ctx.register.error %]
- <h3>[% l('A registration error has occurred') %]</h3>
- <h4>[% l('Please see library staff to complete your registration.') %]</h4>
-
- <br/>
- <p>
- <a href="[% ctx.opac_root %]/home"
- class="opac-button">[% l('Return to the Catalog') %]</a>
- </p>
-
- [% ELSE %]
-
- [% IF ctx.user %]
- <!-- if the user is logged in, make it
- clear we are tracking the requestor -->
- <h4>[% l('New account requested by [_1] [_2] [_3] [_4] [_5]',
- ctx.user.prefix, ctx.user.first_given_name,
- ctx.user.second_given_name, ctx.user.family_name,
- ctx.user.suffix
- ) | html %]</h4>
- [% END %]
-
- <form method='POST' onSubmit="return dobValidate(document.getElementById('stgu.dob'))">
- <table>
- <tr>
- <td valign="top">
- <label for='stgu.home_ou'>[% l('Home Library') %]</label>
- </td>
- <td>[% INCLUDE build_org_selector
- name='stgu.home_ou'
- value=value || ctx_org
- can_have_users_only=1
- valid_org_list=ctx.register.valid_orgs
- %]<br/>
- <div style="font-size:small;font-style:italic;">
- [% l("PINES Location Tip") %]
- </div>
- </td>
- <td>
- [% IF ctx.register.invalid.bad_home_ou %]
- <span class='patron-reg-invalid'>
- [% l('Please select a valid library') %]
- </span>
- [% END %]
- </td>
- </tr>
-[%
-# <=== shifting code left for readability
+ <!-- Quipu form below -->
-# render the table row for each of the register fields
-FOR field_def IN register_fields;
- fclass = field_def.class;
- fname = field_def.name;
- orig_name = fname;
+<div id="eCARDFiles">
- field_path = fclass _ "." _ fname;
+<link href="https://ecard.quipugroup.net/css/eCARD.css" rel="stylesheet">
- IF fname.match('^pref_');
- # Preferred name fields adopt most visibility, etc.
- # settings from the primary name counterparts.
- fname = fname.remove('^pref_');
- END;
+<link href="https://ecard.quipugroup.net/js/jqueryUI/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet">
- show = ctx.register.settings.$fclass.$fname.show;
- require = ctx.register.settings.$fclass.$fname.require;
- example = ctx.register.settings.$fclass.$fname.example;
- value = ctx.register.values.$fclass.$fname;
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/jquery-1.11.1.min.js"></script>
- invalid_require = ctx.register.invalid.$fclass.$fname.require;
- invalid_regex = ctx.register.invalid.$fclass.$fname.regex;
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/jqueryUI/js/jquery-ui-1.10.4.custom.min.js"></script>
- IF orig_name.match('^pref_');
- show = show || require;
- require = 0; # pref name values never required
- END;
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/jquery.xdomainrequest.min.js"></script>
- NEXT UNLESS require OR show;
-%]
-<tr>
- <td>
- <label for='[% field_path %]'>[% field_def.label | html %]</label>
- </td>
- <td>
- <input
- type='text'
- id='[% field_path %]'
- name='[% field_path %]'
- value='[% value || CGI.param(field_path) | html %]'/>
- [% IF require %]
- <span class='patron-reg-invalid'>*</span>
- [% END %]
- </td>
- <td>
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/jquery.PrintArea.js"></script>
- <!-- display errors and example text -->
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/jQuery-Mask-Plugin-master/dist/jquery.mask.min.js"></script>
- [% IF invalid_require %]
- <span class='patron-reg-invalid'>
- [% l('This field is required') %]
- </span>
- [% ELSIF invalid_regex %]
- <span class='patron-reg-invalid'>
- [% l('The value entered does not have the correct format') %]
- </span>
- [% END %]
- [% IF example %]
- <span class='patron-reg-extra'>
- [% l('(Example: [_1])', example) %]
- </span>
- [% END %]
+<script type="text/javascript" src="https://ecard.quipugroup.net/js/eCARDMain.js"></script>
- </td>
-</tr>
-[% END %]
+<script type="text/javascript" src="https://ecard.quipugroup.net/Libraries/48/eCARDLibrary.js"></script>
-<!-- Adding terms of agreement -->
-<tr>
- <td colspan='3' id="main-content-register-terms">
- <p style="font-weight:bold;">By clicking the Submit Registration button below,
- you are applying for the right to use the library and:</p>
- <ul>
- <li>You agree to comply with all its rules and regulations, and give immediate
- notice of any change of address.</li>
- <li>You accept financial responsibility for all fines and/or damages to all
- Library materials, audiovisual materials and equipment beyond normal wear and
- tear, which is lost or damaged beyond use while checked out on your card. Under
- Georgia Code (OCGA Annotated Rev. 1985 20-5-53), failure to return items
- borrowed from a public library is considered a misdemeanor.</li>
- <li><u>If this card is for a juvenile:</u> As the parent or guardian of a child
- under 18 years, you are willing to allow him/her to borrow materials from
- the Public Library. You will take responsibility and make good any charges
- or loss to library materials and pay any fine justly charged.</li>
- </ul>
+</div>
- <p style="font-weight:bold;">After submitting this form, you will have <u>14 days</u>
- to visit the Home Library you have selected above to complete your registration.
- You will need to bring proof of ID and address <a href="http://pines.georgialibraries.org/help-faqs#FAQCard" target='_blank'>
- (see acceptable forms of ID).</a></p>
- <p style="font-weight:bold;">If this card is for a juvenile (under 18 years), the parent
- or guardian who is approving the card must visit the library to complete the
- registration in order for the card to be issued.</p>
- </td>
-</tr>
+<div id="eCARD" data-language="en" data-branchid="">
+<!-- eCARD requires JavaScript in order to display the registration form -->
+<!-- The following will detect if JavaScript is enabled on the patron's browser -->
+<noscript>
+<h2 style="color:red;">Warning - JavaScript Required</h2>
+<p>For full functionality of this web page it is necessary to enable JavaScript in your browser. For more information on most browsers, try <a href="http://www.enable-javascript.com/" target="_blank">How to enable JavaScript</a> OR <a href="http://activatejavascript.org/en/instructions" target="_blank">activatejavascript.org</a><
+</p>
+</noscript>
+</div>
-<!-- End terms of agreement -->
+<!-- End Quipu Code -->
-<!-- ====> shifting the code back to the right for context -->
- [% IF ctx.register.opt_in_settings.size > 0 %]
- [% FOR optin IN ctx.register.opt_in_settings %]
- <tr>
- <td><label for="stgs.[% optin.name | uri %]'">[% optin.label | html %]</label></td>
- <td>
- <input type='checkbox'
- name='stgs.[% optin.name | uri %]'
- id='stgs.[% optin.name | uri %]'
- title="[% optin.label | html %]"
- ></input>
- </td>
- <td><!-- display errors and example text --></td>
- </tr>
- [% END %]
- [% END %]
- <tr>
- <td colspan='3'>
- <a href="[% ctx.opac_root %]/home"
- class="opac-button" style="font-size:large;" >[% l('Cancel') %]</a>
- <input type="submit"
- value="[% l('Submit Registration') %]"
- class="opac-button" style="font-size:large;width:400px;" />
- </td>
- </tr>
- </table>
- </form>
- [% END %]
- <div class="common-full-pad"></div>
- </div>
+ <div class="common-full-pad"></div>
</div>
+</div>
[%- END %]