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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (+13 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 312-317 Link Here
312
                                                [% CASE 'opacnote' %]<span>OPAC note:</span>
324
                                                [% CASE 'opacnote' %]<span>OPAC note:</span>
313
                                                [% CASE 'debarred' %]<span>Restriction expiration:</span>
325
                                                [% CASE 'debarred' %]<span>Restriction expiration:</span>
314
                                                [% CASE 'debarredcomment' %]<span>Restriction comment:</span>
326
                                                [% CASE 'debarredcomment' %]<span>Restriction comment:</span>
327
                                                [% CASE 'password_expiration_date' %]<span>Password expiration date:</span>
315
                                            [% END %]
328
                                            [% END %]
316
                                            </label>
329
                                            </label>
317
                                            [% IF ( field.type == 'text' ) %]
330
                                            [% IF ( field.type == 'text' ) %]
(-)a/tools/modborrowers.pl (-3 / +8 lines)
Lines 51-56 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
51
51
52
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
52
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
53
53
54
$template->param( CanUpdatePasswordExpiration => 1 ) if $logged_in_user->is_superlibrarian;
55
54
my $dbh       = C4::Context->dbh;
56
my $dbh       = C4::Context->dbh;
55
57
56
# Show borrower informations
58
# Show borrower informations
Lines 330-335 if ( $op eq 'show' ) { Link Here
330
        },
332
        },
331
    );
333
    );
332
334
335
    push @fields, { name => "password_expiration_date", type => "date" } if $logged_in_user->is_superlibrarian;
336
333
    $template->param('patron_attributes_codes', \@patron_attributes_codes);
337
    $template->param('patron_attributes_codes', \@patron_attributes_codes);
334
    $template->param('patron_attributes_values', \@patron_attributes_values);
338
    $template->param('patron_attributes_values', \@patron_attributes_values);
335
339
Lines 341-356 if ( $op eq 'do' ) { Link Here
341
345
342
    my @disabled = $input->multi_param('disable_input');
346
    my @disabled = $input->multi_param('disable_input');
343
    my $infos;
347
    my $infos;
344
    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/ ) {
348
    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/ ) {
345
        my $value = $input->param($field);
349
        my $value = $input->param($field);
346
        $infos->{$field} = $value if $value;
350
        $infos->{$field} = $value if $value;
347
        $infos->{$field} = "" if grep { $_ eq $field } @disabled;
351
        $infos->{$field} = "" if grep { $_ eq $field } @disabled;
348
    }
352
    }
349
353
350
    for my $field ( qw( dateenrolled dateexpiry debarred ) ) {
354
    for my $field ( qw( dateenrolled dateexpiry debarred password_expiration_date ) ) {
351
        $infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field};
355
        $infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field};
352
    }
356
    }
353
357
358
    delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian;
359
354
    my @attributes = $input->multi_param('patron_attributes');
360
    my @attributes = $input->multi_param('patron_attributes');
355
    my @attr_values = $input->multi_param('patron_attributes_value');
361
    my @attr_values = $input->multi_param('patron_attributes_value');
356
362
357
- 

Return to bug 29926