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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (+14 lines)
Lines 221-226 Link Here
221
                                                <th>Mobile</th>
221
                                                <th>Mobile</th>
222
                                                <th>Registration date</th>
222
                                                <th>Registration date</th>
223
                                                <th>Expiry date</th>
223
                                                <th>Expiry date</th>
224
                                                [% IF CanUpdatePasswordExpiration %]
225
                                                    <th>Password expiration date</th>
226
                                                [% END %]
224
                                                <th>Circulation note</th>
227
                                                <th>Circulation note</th>
225
                                                <th>OPAC note</th>
228
                                                <th>OPAC note</th>
226
                                                <th>Restriction expiration</th>
229
                                                <th>Restriction expiration</th>
Lines 257-262 Link Here
257
                                                    <td>[% borrower.mobile | html %]</td>
260
                                                    <td>[% borrower.mobile | html %]</td>
258
                                                    <td data-order="[% borrower.dateenrolled | html %]">[% borrower.dateenrolled | $KohaDates %]</td>
261
                                                    <td data-order="[% borrower.dateenrolled | html %]">[% borrower.dateenrolled | $KohaDates %]</td>
259
                                                    <td data-order="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</td>
262
                                                    <td data-order="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</td>
263
                                                    [% IF CanUpdatePasswordExpiration %]
264
                                                        [% IF borrower.password_expiration_date  %]
265
                                                            <td data-order="[% borrower.password_expiration_date | html %]">
266
                                                                [% borrower.password_expiration_date | $KohaDates %]
267
                                                            </td>
268
                                                        [% ELSE %]
269
                                                            <td data-order="9999-99-99">Never</td>
270
                                                        [% END %]
271
                                                    [% END %]
260
                                                    <td>[% borrower.borrowernotes | html %]</td>
272
                                                    <td>[% borrower.borrowernotes | html %]</td>
261
                                                    <td>[% borrower.opacnote | html %]</td>
273
                                                    <td>[% borrower.opacnote | html %]</td>
262
                                                    <td data-order="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</td>
274
                                                    <td data-order="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</td>
Lines 334-339 Link Here
334
                                                Restriction expiration:
346
                                                Restriction expiration:
335
                                                [% CASE 'debarredcomment' %]
347
                                                [% CASE 'debarredcomment' %]
336
                                                Restriction comment:
348
                                                Restriction comment:
349
                                                [% CASE 'password_expiration_date' %]
350
                                                Password expiration date:
337
                                            [% END %]
351
                                            [% END %]
338
                                            </label>
352
                                            </label>
339
                                            [% IF ( field.type == 'text' ) %]
353
                                            [% IF ( field.type == 'text' ) %]
(-)a/tools/modborrowers.pl (-3 / +8 lines)
Lines 50-55 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
50
50
51
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
51
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
52
52
53
$template->param( CanUpdatePasswordExpiration => 1 ) if $logged_in_user->is_superlibrarian;
54
53
my %cookies   = parse CGI::Cookie($cookie);
55
my %cookies   = parse CGI::Cookie($cookie);
54
my $sessionID = $cookies{'CGISESSID'}->value;
56
my $sessionID = $cookies{'CGISESSID'}->value;
55
my $dbh       = C4::Context->dbh;
57
my $dbh       = C4::Context->dbh;
Lines 328-333 if ( $op eq 'show' ) { Link Here
328
        },
330
        },
329
    );
331
    );
330
332
333
    push @fields, { name => "password_expiration_date", type => "date" } if $logged_in_user->is_superlibrarian;
334
331
    $template->param('patron_attributes_codes', \@patron_attributes_codes);
335
    $template->param('patron_attributes_codes', \@patron_attributes_codes);
332
    $template->param('patron_attributes_values', \@patron_attributes_values);
336
    $template->param('patron_attributes_values', \@patron_attributes_values);
333
337
Lines 339-354 if ( $op eq 'do' ) { Link Here
339
343
340
    my @disabled = $input->multi_param('disable_input');
344
    my @disabled = $input->multi_param('disable_input');
341
    my $infos;
345
    my $infos;
342
    for my $field ( qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote debarred debarredcomment/ ) {
346
    for my $field ( qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment/ ) {
343
        my $value = $input->param($field);
347
        my $value = $input->param($field);
344
        $infos->{$field} = $value if $value;
348
        $infos->{$field} = $value if $value;
345
        $infos->{$field} = "" if grep { $_ eq $field } @disabled;
349
        $infos->{$field} = "" if grep { $_ eq $field } @disabled;
346
    }
350
    }
347
351
348
    for my $field ( qw( dateenrolled dateexpiry debarred ) ) {
352
    for my $field ( qw( dateenrolled dateexpiry debarred password_expiration_date ) ) {
349
        $infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field};
353
        $infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field};
350
    }
354
    }
351
355
356
    delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian;
357
352
    my @attributes = $input->multi_param('patron_attributes');
358
    my @attributes = $input->multi_param('patron_attributes');
353
    my @attr_values = $input->multi_param('patron_attributes_value');
359
    my @attr_values = $input->multi_param('patron_attributes_value');
354
360
355
- 

Return to bug 29926