-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
-[% INCLUDE 'calendar.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-$(document).ready(function() {
-
- $("#saverecord").css({ 'margin-left': 0 });
- var original_offset = $("#toolbar").position().top;
- var additional_height = $("#filters").height();
- $('#toolbar').fixFloat({ 'originalOffset': original_offset });
- $("#filteraction_on").on("click", function(){
- $(window).off('scroll');
- $("#toolbar").css({ top: original_offset + additional_height });
- $('#toolbar').fixFloat({ 'originalOffset': original_offset + additional_height });
- });
- $("#filteraction_off").on("click", function(){
- $(window).off('scroll');
- $("#toolbar").css({ top: original_offset });
- $('#toolbar').fixFloat({ 'originalOffset': original_offset });
- })
-
- [% IF categorycode %]
- update_category_code( "[% categorycode %]" );
- [% ELSE %]
- if ( $("#categorycode_entry").length > 0 ){
- var category_code = $("#categorycode_entry").find("option:selected").val();
- update_category_code( category_code );
- }
- [% END %]
-});
-
-$(document).ready(function() {
-
- var toggle_quick_add = $(".toggle_quick_add");
- $(toggle_quick_add).click(function(e){
- toggle_quick_add.toggle();
- e.preventDefault();
- var toggle_to = '';
- var toggle_from = '';
- if( $("#entryform:visible").length ) {
- toggle_to = "#quick_add_form label";
- toggle_from = "#entryform label";
- } else {
- toggle_to="#entryform label";
- toggle_from = "#quick_add_form label";
- }
- $(toggle_from).each(function() {
- var input_label = $(this).attr('for');
- if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) {
- $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') );
- return;
- }
- $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );
- });
-
- $(".toggler").toggle();
- });
-
- $("#save_quick_add").click(function(){
- $("#quick_add_form").validate();
- if( $("#quick_add_form").valid()){
- $('.toggle_quick_add').click();
- $('#saverecord').click();
- }
- else {return false;}
- });
-
- $("#entryform").validate({
- rules: {
- password: {
- required: true,
- password_strong: true,
- password_no_spaces: true
- },
- password2: {
- required: true,
- password_match: true
- }
- }
- });
-
- $("#saverecord").click(function(){
- if( check_form_borrowers() ){
- $("#entryform").submit();
- }
- });
-
- $('#duplicate').on('click', function() {
- $("input[name='op']").val('modify');
- $("input[name='borrowernumber']").val('[% check_member %]');
- $("input[name='check_member']").val('');
- $('#entryform').submit();
- });
-
- $('#not-duplicate').on('click', function() {
- $("input[name='nodouble']").val('1');
- $('#entryform').submit();
- });
-});
-
- var MSG_SEPARATOR = _("Separator must be / in field %s");
- var MSG_INCORRECT_DAY = _("Invalid day entered in field %s");
- var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s");
- var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s");
- var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
- var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
- var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
- var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
- var MSG_MONTH = _("%s month")
- var MSG_MONTHS = _("%s months")
- var MSG_YEAR = _("%s year")
- var MSG_YEARS = _("%s years")
- var LABEL_CHANGE = _("Change");
- var LABEL_SET_TO_PATRON = _("Set to patron");
- var LABEL_AGE = _("Age");
-
-//]]>
-</script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/members.js"></script>