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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (+1 lines)
Lines 4-9 Link Here
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE Categories %]
5
[% USE Categories %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[% USE scalar %]
7
<div id="toolbar" class="btn-toolbar">
8
<div id="toolbar" class="btn-toolbar">
8
    [% IF CAN_user_borrowers_edit_borrowers %]
9
    [% IF CAN_user_borrowers_edit_borrowers %]
9
        [% IF ( guarantor ) %]
10
        [% IF ( guarantor ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc (+7 lines)
Lines 3-8 Link Here
3
[% USE Categories %]
3
[% USE Categories %]
4
4
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
6
    var advsearch = "[% advsearch | html %]";
13
    var advsearch = "[% advsearch | html %]";
7
    var destination = "[% destination | html %]";
14
    var destination = "[% destination | html %]";
8
15
(-)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 */
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 */
2
2
3
$(document).ready(function(){
3
$(document).ready(function(){
4
    $("#filteraction_off, #filteraction_on").on('click', function(e) {
4
    $("#filteraction_off, #filteraction_on").on('click', function(e) {
Lines 19-31 $(document).ready(function(){ Link Here
19
        var MSG_DATE_FORMAT = "";
19
        var MSG_DATE_FORMAT = "";
20
        if ( $(this).val() == 'dateofbirth' ) {
20
        if ( $(this).val() == 'dateofbirth' ) {
21
            if( dateformat == 'us' ){
21
            if( dateformat == 'us' ){
22
                MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'");
22
                MSG_DATE_FORMAT = MSG_DATE_FORMAT_US;
23
            } else if( dateformat == 'iso' ){
23
            } else if( dateformat == 'iso' ){
24
                MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'");
24
                MSG_DATE_FORMAT = MSG_DATE_FORMAT_ISO;
25
            } else if( dateformat == 'metric' ){
25
            } else if( dateformat == 'metric' ){
26
                MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'");
26
                MSG_DATE_FORMAT = MSG_DATE_FORMAT_METRIC;
27
            } else if( dateformat == 'dmydot' ){
27
            } else if( dateformat == 'dmydot' ){
28
                MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD.MM.YYYY'");
28
                MSG_DATE_FORMAT = MSG_DATE_FORMAT_DMYDOT;
29
            }
29
            }
30
            $('#searchmember').attr("title", MSG_DATE_FORMAT).tooltip('show');
30
            $('#searchmember').attr("title", MSG_DATE_FORMAT).tooltip('show');
31
        } else {
31
        } else {
Lines 105-111 $(document).ready(function(){ Link Here
105
});
105
});
106
106
107
function confirm_updatechild() {
107
function confirm_updatechild() {
108
    var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category?  This cannot be undone."));
108
    var is_confirmed = window.confirm( MSG_CONFIRM_UPDATE_CHILD );
109
    if (is_confirmed) {
109
    if (is_confirmed) {
110
        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber;
110
        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=' + borrowernumber;
111
    }
111
    }
Lines 120-126 function update_child() { Link Here
120
}
120
}
121
121
122
function confirm_reregistration() {
122
function confirm_reregistration() {
123
    var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?"));
123
    var is_confirmed = window.confirm( MSG_CONFIRM_RENEW_PATRON );
124
    if (is_confirmed) {
124
    if (is_confirmed) {
125
        window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&amp;destination=' + destination + '&amp;reregistration=y';
125
        window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=' + borrowernumber + '&amp;destination=' + destination + '&amp;reregistration=y';
126
    }
126
    }
127
- 

Return to bug 22904