|
Lines 170-177
if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
Link Here
|
| 170 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
170 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
| 171 |
next unless exists $newdata{$_}; |
171 |
next unless exists $newdata{$_}; |
| 172 |
my $userdate = $newdata{$_} or next; |
172 |
my $userdate = $newdata{$_} or next; |
| 173 |
if ( $userdate ) { |
173 |
if ( is_formatted_date_string ( $userdate ) || is_formatted_date_string( $userdate, 'iso' ) ) { |
| 174 |
$newdata{$_} = output_pref({ dt => dt_from_string( $userdate ), dateformat => 'iso', dateonly => 1 }); |
174 |
$newdata{$_} = output_pref({ dt => dt_from_string( $userdate ), dateformat => 'iso', dateonly => 1 }); |
|
|
175 |
} else { |
| 176 |
($userdate eq '0000-00-00') and warn "Data error: $_ is '0000-00-00'"; |
| 177 |
$template->param( "ERROR_$_" => 1 ); |
| 178 |
push(@errors,"ERROR_$_"); |
| 175 |
} |
179 |
} |
| 176 |
} |
180 |
} |
| 177 |
# check permission to modify login info. |
181 |
# check permission to modify login info. |
|
Lines 660-666
if (C4::Context->preference('uppercasesurnames')) {
Link Here
|
| 660 |
|
664 |
|
| 661 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
665 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
| 662 |
if ( $data{$_} ) { |
666 |
if ( $data{$_} ) { |
| 663 |
$data{$_} = output_pref({ dt => dt_from_string( $data{$_} ), dateonly => 1 }); # back to syspref for display |
667 |
if ( is_formatted_date_string ( $data{$_}, 'iso' ) ) { |
|
|
668 |
$data{$_} = output_pref({ dt => dt_from_string( $data{$_} ), dateonly => 1 }); # back to syspref for display |
| 669 |
} else { |
| 670 |
$data{$_} = ''; |
| 671 |
} |
| 664 |
} |
672 |
} |
| 665 |
$template->param( $_ => $data{$_}); |
673 |
$template->param( $_ => $data{$_}); |
| 666 |
} |
674 |
} |
| 667 |
- |
|
|