|
Lines 313-319
elsif ( $action eq 'edit' ) { #Display logged in borrower's data
Link Here
|
| 313 |
$template->param( |
313 |
$template->param( |
| 314 |
borrower => $borrower, |
314 |
borrower => $borrower, |
| 315 |
guarantor => scalar Koha::Patrons->find($borrowernumber)->guarantor(), |
315 |
guarantor => scalar Koha::Patrons->find($borrowernumber)->guarantor(), |
| 316 |
hidden => GetHiddenFields( $mandatory, 'modification' ), |
316 |
hidden => GetHiddenFields( $mandatory, 'edit' ), |
| 317 |
csrf_token => Koha::Token->new->generate_csrf({ |
317 |
csrf_token => Koha::Token->new->generate_csrf({ |
| 318 |
session_id => scalar $cgi->cookie('CGISESSID'), |
318 |
session_id => scalar $cgi->cookie('CGISESSID'), |
| 319 |
}), |
319 |
}), |
|
Lines 342-348
sub GetHiddenFields {
Link Here
|
| 342 |
my ( $mandatory, $action ) = @_; |
342 |
my ( $mandatory, $action ) = @_; |
| 343 |
my %hidden_fields; |
343 |
my %hidden_fields; |
| 344 |
|
344 |
|
| 345 |
my $BorrowerUnwantedField = $action eq 'modification' ? |
345 |
my $BorrowerUnwantedField = $action eq 'edit' ? |
| 346 |
C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) : |
346 |
C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) : |
| 347 |
C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" ); |
347 |
C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" ); |
| 348 |
|
348 |
|
| 349 |
- |
|
|