- $template->param( othernames => $bor->{'othernames'},
- surname => $bor->{'surname'},
- firstname => $bor->{'firstname'},
- borrowernumber => $bor->{'borrowernumber'},
- cardnumber => $bor->{'cardnumber'},
- categorycode => $bor->{'categorycode'},
- category_type => $bor->{'category_type'},
- categoryname => $bor->{'description'},
- address => $bor->{'address'},
- address2 => $bor->{'address2'},
- city => $bor->{'city'},
- state => $bor->{'state'},
- zipcode => $bor->{'zipcode'},
- country => $bor->{'country'},
- phone => $bor->{'phone'},
- email => $bor->{'email'},
- branchcode => $bor->{'branchcode'},
- branchname => GetBranchName($bor->{'branchcode'}),
- userid => $bor->{'userid'},
- destination => $destination,
- is_child => ($bor->{'category_type'} eq 'C'),
- activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
- minPasswordLength => $minpw,
- RoutingSerials => C4::Context->preference('RoutingSerials'),
- );
-
-if( scalar(@errors )){
- $template->param( errormsg => 1 );
- foreach my $error (@errors) {
- $template->param($error) || $template->param( $error => 1);
- }
-
+$template->param(
+ othernames => $bor->{'othernames'},
+ surname => $bor->{'surname'},
+ firstname => $bor->{'firstname'},
+ borrowernumber => $bor->{'borrowernumber'},
+ cardnumber => $bor->{'cardnumber'},
+ categorycode => $bor->{'categorycode'},
+ category_type => $bor->{'category_type'},
+ categoryname => $bor->{'description'},
+ address => $bor->{address},
+ address2 => $bor->{'address2'},
+ streettype => $bor->{streettype},
+ city => $bor->{'city'},
+ state => $bor->{'state'},
+ zipcode => $bor->{'zipcode'},
+ country => $bor->{'country'},
+ phone => $bor->{'phone'},
+ phonepro => $bor->{'phonepro'},
+ mobile => $bor->{'mobile'},
+ email => $bor->{'email'},
+ emailpro => $bor->{'emailpro'},
+ branchcode => $bor->{'branchcode'},
+ userid => $bor->{'userid'},
+ destination => $destination,
+ is_child => ( $bor->{'category_type'} eq 'C' ),
+ activeBorrowerRelationship => ( C4::Context->preference('borrowerRelationship') ne '' ),
+ minPasswordLength => $minpw,
+ RoutingSerials => C4::Context->preference('RoutingSerials'),
+ csrf_token => Koha::Token->new->generate_csrf({
+ id => C4::Context->userenv->{id},
+ secret => md5_base64( C4::Context->config('pass') ),
+ }),
+);
+
+if ( scalar(@errors) ) {
+ $template->param( errormsg => 1 );
+ foreach my $error (@errors) {
+ $template->param($error) || $template->param( $error => 1 );
+ }