| 
      
            Lines 88-94
          if ( defined $min ) {
      
      
        Link Here
      
     | 
  
        
          | 88 | 
           | 
          88 | 
           | 
        
        
          | 89 | 
          $template->param(  | 
          89 | 
          $template->param(  | 
        
        
          | 90 | 
              action            => $action,  | 
          90 | 
              action            => $action,  | 
        
          
            
              | 91 | 
                  hidden            => GetHiddenFields( $mandatory, 'registration' ),  | 
              91 | 
                  hidden            => GetHiddenFields( $mandatory, $action ),  | 
            
        
          | 92 | 
              mandatory         => $mandatory,  | 
          92 | 
              mandatory         => $mandatory,  | 
        
        
          | 93 | 
              libraries         => \@libraries,  | 
          93 | 
              libraries         => \@libraries,  | 
        
        
          | 94 | 
              OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), | 
          94 | 
              OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), | 
        
  
    | 
      
            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' || $action eq 'update' ?  | 
            
        
          | 346 | 
                C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) :  | 
          346 | 
                C4::Context->preference( "PatronSelfModificationBorrowerUnwantedField" ) :  | 
        
        
          | 347 | 
                C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" );  | 
          347 | 
                C4::Context->preference( "PatronSelfRegistrationBorrowerUnwantedField" );  | 
        
        
          | 348 | 
           | 
          348 | 
           | 
        
            
              | 349 | 
              -   | 
               | 
               |