View | Details | Raw Unified | Return to bug 26334
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc (-7 lines)
Lines 3-15 Link Here
3
[% USE Categories %]
3
[% USE Categories %]
4
<!-- str/members-menu.inc -->
4
<!-- str/members-menu.inc -->
5
<script>
5
<script>
6
    var MSG_CONFIRM_RENEW_PATRON = _("Are you sure you want to renew this patron's registration?");
7
    var MSG_CONFIRM_UPDATE_CHILD = _("Are you sure you want to update this child to an Adult category? This cannot be undone.");
8
    var MSG_DATE_FORMAT_US = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
9
    var MSG_DATE_FORMAT_ISO = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
10
    var MSG_DATE_FORMAT_METRIC = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
11
    var MSG_DATE_FORMAT_DMYDOT = _("Dates of birth should be entered in the format 'DD.MM.YYYY'");
12
13
    var advsearch = "[% advsearch | html %]";
6
    var advsearch = "[% advsearch | html %]";
14
    var destination = "[% destination | html %]";
7
    var destination = "[% destination | html %]";
15
8
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-8 / +7 lines)
Lines 1-4 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
Lines 106-118 function searchfield_date_tooltip(filter) { 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 {
Lines 121-127 function searchfield_date_tooltip(filter) { 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
    }
Lines 136-142 function update_child() { 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 + '&amp;destination=' + destination + '&amp;reregistration=y';
141
        window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&amp;destination=' + destination + '&amp;reregistration=y';
142
    }
142
    }
143
- 

Return to bug 26334