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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-2 / +5 lines)
Lines 35-41 Link Here
35
    flatpickr.l10ns.default.months   = flatpickr_months;
35
    flatpickr.l10ns.default.months   = flatpickr_months;
36
    flatpickr.setDefaults({
36
    flatpickr.setDefaults({
37
        allowInput: true,
37
        allowInput: true,
38
        dateFormat: flatpickr_dateformat_string,
38
        dateFormat: "Y-m-d",
39
        altInput: true,
40
        altFormat: flatpickr_dateformat_string,
41
        altInputClass: 'flatpickr-input',
39
        nextArrow: '<i class="fa fa-fw fa-arrow-right"></i>',
42
        nextArrow: '<i class="fa fa-fw fa-arrow-right"></i>',
40
        prevArrow: '<i class="fa fa-fw fa-arrow-left"></i>',
43
        prevArrow: '<i class="fa fa-fw fa-arrow-left"></i>',
41
        time_24hr: flatpickr_timeformat,
44
        time_24hr: flatpickr_timeformat,
Lines 46-52 Link Here
46
        },
49
        },
47
        onReady: function( selectedDates, dateStr, instance ){
50
        onReady: function( selectedDates, dateStr, instance ){
48
            /* When flatpickr instance is created, automatically append a "clear date" link */
51
            /* When flatpickr instance is created, automatically append a "clear date" link */
49
            $(instance.input)
52
            $(instance.input).siblings('input.flatpickr')
50
                /* Add a wrapper element so that we can prevent the clear button from wrapping */
53
                /* Add a wrapper element so that we can prevent the clear button from wrapping */
51
                .wrap("<span class='flatpickr_wrapper'></span>")
54
                .wrap("<span class='flatpickr_wrapper'></span>")
52
                .attr("autocomplete", "off")
55
                .attr("autocomplete", "off")
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-1 / +1 lines)
Lines 128-134 function select_user(borrowernumber, borrower, relationship) { Link Here
128
128
129
function CalculateAge(dateofbirth) {
129
function CalculateAge(dateofbirth) {
130
    var today = new Date();
130
    var today = new Date();
131
    var dob = Date_from_syspref(dateofbirth);
131
    var dob = new Date(dateofbirth);
132
    var age = {};
132
    var age = {};
133
133
134
    age.year = today.getFullYear() - dob.getFullYear();
134
    age.year = today.getFullYear() - dob.getFullYear();
(-)a/members/memberentry.pl (-21 lines)
Lines 198-216 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
198
        }
198
        }
199
    }
199
    }
200
200
201
    foreach (qw(dateenrolled dateexpiry dateofbirth password_expiration_date)) {
202
        next unless exists $newdata{$_};
203
        my $userdate = $newdata{$_} or next;
204
205
        my $formatteddate = eval { output_pref({ dt => dt_from_string( $userdate ), dateformat => 'iso', dateonly => 1 } ); };
206
        if ( $formatteddate ) {
207
            $newdata{$_} = $formatteddate;
208
        } else {
209
            $template->param( "ERROR_$_" => 1 );
210
            push(@errors,"ERROR_$_");
211
        }
212
    }
213
214
    # check permission to modify login info.
201
    # check permission to modify login info.
215
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
202
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
216
        $NoUpdateLogin = 1;
203
        $NoUpdateLogin = 1;
Lines 797-809 if (C4::Context->preference('uppercasesurnames')) { Link Here
797
    $data{'contactname'} &&= uc( $data{'contactname'} );
784
    $data{'contactname'} &&= uc( $data{'contactname'} );
798
}
785
}
799
786
800
foreach (qw(dateenrolled dateexpiry dateofbirth password_expiration_date)) {
801
    if ( $data{$_} ) {
802
       $data{$_} = eval { output_pref({ dt => dt_from_string( $data{$_} ), dateonly => 1 } ); };  # back to syspref for display
803
    }
804
    $template->param( $_ => $data{$_});
805
}
806
807
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
787
if ( C4::Context->preference('ExtendedPatronAttributes') ) {
808
    patron_attributes_form( $template, $extended_patron_attributes, $op );
788
    patron_attributes_form( $template, $extended_patron_attributes, $op );
809
}
789
}
810
- 

Return to bug 30718