diff options
author | ivan <ivan> | 2009-08-07 00:39:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-08-07 00:39:14 +0000 |
commit | 958afb8d05de67e12df258b57bedcf85028b6253 (patch) | |
tree | 504079330e2f553faf8a899dd8dcebe3d5d138d6 /httemplate/elements/tr-input-date-field.html | |
parent | b3e081bbd2ba95554687a531bc134c00026a3669 (diff) |
don't start recurring billing when a start date hasn't been reached yet either... and since that works, add the start date to new package order, RT#5347
Diffstat (limited to 'httemplate/elements/tr-input-date-field.html')
-rw-r--r-- | httemplate/elements/tr-input-date-field.html | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/httemplate/elements/tr-input-date-field.html b/httemplate/elements/tr-input-date-field.html index 11581d5bc..428221a5c 100644 --- a/httemplate/elements/tr-input-date-field.html +++ b/httemplate/elements/tr-input-date-field.html @@ -28,12 +28,15 @@ my($name, $value, $label, $format, $usedatetime) = @_; $format = "%m/%d/%Y" unless $format; $label = $name unless $label; -if ($usedatetime) { - my $dt = DateTime->from_epoch(epoch => $value, time_zone => 'floating'); - $value = $dt->strftime($format) - unless $value eq ''; -}else{ - $value = time2str($format, $value); +if ( $value =~ /\S/ ) { + if ( $usedatetime ) { + my $dt = DateTime->from_epoch(epoch => $value, time_zone => 'floating'); + $value = $dt->strftime($format); + } else { + $value = time2str($format, $value); + } +} else { + $value = ''; } </%init> |