|
Lines 89-95
if ( defined $min ) {
Link Here
|
| 89 |
|
89 |
|
| 90 |
$template->param( |
90 |
$template->param( |
| 91 |
action => $action, |
91 |
action => $action, |
| 92 |
hidden => GetHiddenFields( $mandatory, 'registration' ), |
92 |
hidden => GetHiddenFields( $mandatory, $action ), |
| 93 |
mandatory => $mandatory, |
93 |
mandatory => $mandatory, |
| 94 |
libraries => \@libraries, |
94 |
libraries => \@libraries, |
| 95 |
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), |
95 |
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), |
|
Lines 316-322
elsif ( $action eq 'edit' ) { #Display logged in borrower's data
Link Here
|
| 316 |
$template->param( |
316 |
$template->param( |
| 317 |
borrower => $borrower, |
317 |
borrower => $borrower, |
| 318 |
guarantor => scalar Koha::Patrons->find($borrowernumber)->guarantor(), |
318 |
guarantor => scalar Koha::Patrons->find($borrowernumber)->guarantor(), |
| 319 |
hidden => GetHiddenFields( $mandatory, 'modification' ), |
319 |
hidden => GetHiddenFields( $mandatory, 'edit' ), |
| 320 |
csrf_token => Koha::Token->new->generate_csrf({ |
320 |
csrf_token => Koha::Token->new->generate_csrf({ |
| 321 |
session_id => scalar $cgi->cookie('CGISESSID'), |
321 |
session_id => scalar $cgi->cookie('CGISESSID'), |
| 322 |
}), |
322 |
}), |
|
Lines 345-351
sub GetHiddenFields {
Link Here
|
| 345 |
my ( $mandatory, $action ) = @_; |
345 |
my ( $mandatory, $action ) = @_; |
| 346 |
my %hidden_fields; |
346 |
my %hidden_fields; |
| 347 |
|
347 |
|
| 348 |
my $BorrowerUnwantedField = $action eq 'modification' ? |
348 |
my $BorrowerUnwantedField = $action eq 'edit' || $action eq 'update' ? |
| 349 |
C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) : |
349 |
C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) : |
| 350 |
C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" ); |
350 |
C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" ); |
| 351 |
|
351 |
|
| 352 |
- |
|
|