|
Link Here
|
| 1 |
/* global borrowernumber advsearch dateformat _ CAN_user_borrowers_edit_borrowers number_of_adult_categories destination Sticky MSG_DATE_FORMAT_US MSG_DATE_FORMAT_ISO MSG_DATE_FORMAT_METRIC MSG_DATE_FORMAT_DMYDOT MSG_CONFIRM_UPDATE_CHILD MSG_CONFIRM_RENEW_PATRON */ |
1 |
/* global borrowernumber advsearch dateformat __ CAN_user_borrowers_edit_borrowers number_of_adult_categories destination Sticky */ |
| 2 |
|
2 |
|
| 3 |
$(document).ready(function(){ |
3 |
$(document).ready(function(){ |
| 4 |
|
4 |
|
|
Link Here
|
| 106 |
if ( $(type).val() == 'dateofbirth' ) { |
106 |
if ( $(type).val() == 'dateofbirth' ) { |
| 107 |
var MSG_DATE_FORMAT = ""; |
107 |
var MSG_DATE_FORMAT = ""; |
| 108 |
if( dateformat == 'us' ){ |
108 |
if( dateformat == 'us' ){ |
| 109 |
MSG_DATE_FORMAT = MSG_DATE_FORMAT_US; |
109 |
MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'MM/DD/YYYY'"); |
| 110 |
} else if( dateformat == 'iso' ){ |
110 |
} else if( dateformat == 'iso' ){ |
| 111 |
MSG_DATE_FORMAT = MSG_DATE_FORMAT_ISO; |
111 |
MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'YYYY-MM-DD'"); |
| 112 |
} else if( dateformat == 'metric' ){ |
112 |
} else if( dateformat == 'metric' ){ |
| 113 |
MSG_DATE_FORMAT = MSG_DATE_FORMAT_METRIC; |
113 |
MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'DD/MM/YYYY'"); |
| 114 |
} else if( dateformat == 'dmydot' ){ |
114 |
} else if( dateformat == 'dmydot' ){ |
| 115 |
MSG_DATE_FORMAT = MSG_DATE_FORMAT_DMYDOT; |
115 |
MSG_DATE_FORMAT = __("Dates of birth should be entered in the format 'DD.MM.YYYY'"); |
| 116 |
} |
116 |
} |
| 117 |
$(field).attr("title", MSG_DATE_FORMAT).tooltip('show'); |
117 |
$(field).attr("title", MSG_DATE_FORMAT).tooltip('show'); |
| 118 |
} else { |
118 |
} else { |
|
Link Here
|
| 121 |
} |
121 |
} |
| 122 |
|
122 |
|
| 123 |
function confirm_updatechild() { |
123 |
function confirm_updatechild() { |
| 124 |
var is_confirmed = window.confirm( MSG_CONFIRM_UPDATE_CHILD ); |
124 |
var is_confirmed = window.confirm( __("Are you sure you want to update this child to an Adult category? This cannot be undone.") ); |
| 125 |
if (is_confirmed) { |
125 |
if (is_confirmed) { |
| 126 |
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber; |
126 |
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber; |
| 127 |
} |
127 |
} |
|
Link Here
|
| 136 |
} |
136 |
} |
| 137 |
|
137 |
|
| 138 |
function confirm_reregistration() { |
138 |
function confirm_reregistration() { |
| 139 |
var is_confirmed = window.confirm( MSG_CONFIRM_RENEW_PATRON ); |
139 |
var is_confirmed = window.confirm( __("Are you sure you want to renew this patron's registration?") ); |
| 140 |
if (is_confirmed) { |
140 |
if (is_confirmed) { |
| 141 |
window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&destination=' + destination + '&reregistration=y'; |
141 |
window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&destination=' + destination + '&reregistration=y'; |
| 142 |
} |
142 |
} |
| 143 |
- |
|
|