|
Lines 262-267
if ( $op eq 'show' ) {
Link Here
|
| 262 |
type => "text", |
262 |
type => "text", |
| 263 |
mandatory => ( grep /opacnote/, @mandatoryFields ) ? 1 : 0, |
263 |
mandatory => ( grep /opacnote/, @mandatoryFields ) ? 1 : 0, |
| 264 |
} |
264 |
} |
|
|
265 |
, |
| 266 |
{ |
| 267 |
name => "debarred", |
| 268 |
type => "date", |
| 269 |
mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0, |
| 270 |
} |
| 271 |
, |
| 272 |
{ |
| 273 |
name => "debarredcomment", |
| 274 |
type => "text", |
| 275 |
mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0, |
| 276 |
}, |
| 265 |
); |
277 |
); |
| 266 |
|
278 |
|
| 267 |
$template->param('patron_attributes_codes', \@patron_attributes_codes); |
279 |
$template->param('patron_attributes_codes', \@patron_attributes_codes); |
|
Lines 275-287
if ( $op eq 'do' ) {
Link Here
|
| 275 |
|
287 |
|
| 276 |
my @disabled = $input->multi_param('disable_input'); |
288 |
my @disabled = $input->multi_param('disable_input'); |
| 277 |
my $infos; |
289 |
my $infos; |
| 278 |
for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote/ ) { |
290 |
for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote debarred debarredcomment/ ) { |
| 279 |
my $value = $input->param($field); |
291 |
my $value = $input->param($field); |
| 280 |
$infos->{$field} = $value if $value; |
292 |
$infos->{$field} = $value if $value; |
| 281 |
$infos->{$field} = "" if grep { /^$field$/ } @disabled; |
293 |
$infos->{$field} = "" if grep { /^$field$/ } @disabled; |
| 282 |
} |
294 |
} |
| 283 |
|
295 |
|
| 284 |
for my $field ( qw( dateenrolled dateexpiry ) ) { |
296 |
for my $field ( qw( dateenrolled dateexpiry debarred ) ) { |
| 285 |
$infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field}; |
297 |
$infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field}; |
| 286 |
} |
298 |
} |
| 287 |
|
299 |
|
| 288 |
- |
|
|