|
Lines 165-172
foreach (@field_check) {
Link Here
|
| 165 |
$template->param( "quickadd" => 1 ) if ($quickadd); |
165 |
$template->param( "quickadd" => 1 ) if ($quickadd); |
| 166 |
$template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); |
166 |
$template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); |
| 167 |
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); |
167 |
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); |
|
|
168 |
my $logged_in_user = Koha::Patrons->find($loggedinuser); |
| 168 |
if ( $op eq 'edit_form' or $op eq 'cud-save' or $op eq 'duplicate' ) { |
169 |
if ( $op eq 'edit_form' or $op eq 'cud-save' or $op eq 'duplicate' ) { |
| 169 |
my $logged_in_user = Koha::Patrons->find($loggedinuser); |
|
|
| 170 |
output_and_exit_if_error( |
170 |
output_and_exit_if_error( |
| 171 |
$input, $cookie, $template, |
171 |
$input, $cookie, $template, |
| 172 |
{ module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } |
172 |
{ module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } |
|
Lines 176-189
if ( $op eq 'edit_form' or $op eq 'cud-save' or $op eq 'duplicate' ) {
Link Here
|
| 176 |
if ( $patron->is_superlibrarian && !$logged_in_user->is_superlibrarian ) { |
176 |
if ( $patron->is_superlibrarian && !$logged_in_user->is_superlibrarian ) { |
| 177 |
$NoUpdateEmail = 1; |
177 |
$NoUpdateEmail = 1; |
| 178 |
} |
178 |
} |
| 179 |
if ( $logged_in_user->is_superlibrarian ) { |
|
|
| 180 |
$CanUpdatePasswordExpiration = 1; |
| 181 |
$CanUpdateProtectPatron = 1; |
| 182 |
} |
| 183 |
|
| 184 |
$borrower_data = $patron->unblessed; |
179 |
$borrower_data = $patron->unblessed; |
| 185 |
} |
180 |
} |
| 186 |
|
181 |
|
|
|
182 |
if ( $logged_in_user->is_superlibrarian ) { |
| 183 |
$CanUpdatePasswordExpiration = 1; |
| 184 |
$CanUpdateProtectPatron = 1; |
| 185 |
} |
| 186 |
|
| 187 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
187 |
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; |
| 188 |
my $category = Koha::Patron::Categories->find($categorycode); |
188 |
my $category = Koha::Patron::Categories->find($categorycode); |
| 189 |
$template->param( patron_category => $category ); |
189 |
$template->param( patron_category => $category ); |
| 190 |
- |
|
|