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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (+7 lines)
Lines 414-419 Link Here
414
                                                    There is no value defined for [% field.name | html %]
414
                                                    There is no value defined for [% field.name | html %]
415
                                                [% END %]
415
                                                [% END %]
416
                                            [% END %]
416
                                            [% END %]
417
                                            [% IF ( field.type == 'bool' ) %]
418
                                                <select name="[% field.name | html %]" >
419
                                                    <option value=""></option>
420
                                                    <option value="1">Yes</option>
421
                                                    <option value="0">No</option>
422
                                                </select>
423
                                            [% END %]
417
                                            [% IF ( field.type == 'date' ) %]
424
                                            [% IF ( field.type == 'date' ) %]
418
                                                <input type="text" name="[% field.name | html %]" id="[% field.name | html %]" value="" size="10" maxlength="10" class="flatpickr" />
425
                                                <input type="text" name="[% field.name | html %]" id="[% field.name | html %]" value="" size="10" maxlength="10" class="flatpickr" />
419
                                                <a href="#"  class="clear-date" id="clear-date-[% field.name | html %]" ><i class="fa fa-fw fa-trash-can"></i> Clear</a>
426
                                                <a href="#"  class="clear-date" id="clear-date-[% field.name | html %]" ><i class="fa fa-fw fa-trash-can"></i> Clear</a>
(-)a/tools/modborrowers.pl (-11 / +6 lines)
Lines 196-205 if ( $op eq 'cud-show' || $op eq 'show' ) { Link Here
196
    my @categories_option;
196
    my @categories_option;
197
    push @categories_option, { value => $_->categorycode, lib => $_->description } for @patron_categories;
197
    push @categories_option, { value => $_->categorycode, lib => $_->description } for @patron_categories;
198
    unshift @categories_option, { value => "", lib => "" };
198
    unshift @categories_option, { value => "", lib => "" };
199
    my @protected_option;
200
    push @protected_option, { value => 1, lib => "Yes" };
201
    push @protected_option, { value => 0, lib => "No" };
202
    unshift @protected_option, { value => "", lib => "" };
203
    my $bsort1 = GetAuthorisedValues("Bsort1");
199
    my $bsort1 = GetAuthorisedValues("Bsort1");
204
    my @sort1_option;
200
    my @sort1_option;
205
    push @sort1_option, { value => $_->{authorised_value}, lib => $_->{lib} } for @$bsort1;
201
    push @sort1_option, { value => $_->{authorised_value}, lib => $_->{lib} } for @$bsort1;
Lines 340-348 if ( $op eq 'cud-show' || $op eq 'show' ) { Link Here
340
        },
336
        },
341
    );
337
    );
342
338
343
    if ($logged_in_user->is_superlibrarian) {
339
    if ( $logged_in_user->is_superlibrarian ) {
344
        push @fields, { name => "password_expiration_date", type => "date" } ;
340
        push @fields, { name => "password_expiration_date", type => "date" };
345
        push @fields, { name => "protected", type => "select", option => \@protected_option };
341
        push @fields, { name => "protected",                type => "bool" };
346
    }
342
    }
347
343
348
    $template->param( 'patron_attributes_codes',  \@patron_attributes_codes );
344
    $template->param( 'patron_attributes_codes',  \@patron_attributes_codes );
Lines 361-368 if ( $op eq 'cud-do' ) { Link Here
361
        qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile fax sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment protected/
357
        qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile fax sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment protected/
362
        )
358
        )
363
    {
359
    {
364
        my $value = $input->param($field) if $input->param($field) ne '';
360
        my $value = $input->param($field);
365
        $infos->{$field} = $value if defined $value;
361
        $infos->{$field} = $value if $value;
366
        $infos->{$field} = ""     if grep { $_ eq $field } @disabled;
362
        $infos->{$field} = ""     if grep { $_ eq $field } @disabled;
367
    }
363
    }
368
364
Lines 371-377 if ( $op eq 'cud-do' ) { Link Here
371
    }
367
    }
372
368
373
    delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian;
369
    delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian;
374
    delete $infos->{protected} unless $logged_in_user->is_superlibrarian;
370
    delete $infos->{protected}                unless $logged_in_user->is_superlibrarian;
375
371
376
    my @errors;
372
    my @errors;
377
    my @borrowernumbers = $input->multi_param('borrowernumber');
373
    my @borrowernumbers = $input->multi_param('borrowernumber');
378
- 

Return to bug 37360