fixed: DataForm acknowledgement screen shows incorrect value for Date/Time fields
This commit is contained in:
parent
7f095970c6
commit
7be08540c1
4 changed files with 5 additions and 6 deletions
|
|
@ -447,7 +447,7 @@ Returns the value rendered suitably in HTML. This is useful for forms that are r
|
|||
|
||||
sub getValueAsHtml {
|
||||
my $self = shift;
|
||||
return $self->getDefaultValue(@_);
|
||||
return $self->getOriginalValue(@_);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -178,10 +178,8 @@ Return the date in a human readable format.
|
|||
sub getValueAsHtml {
|
||||
my ($self) = @_;
|
||||
# This should probably be rewritten as a cascading ternary
|
||||
if (!$self->get("defaultValue")
|
||||
|| $self->get("defaultValue") =~ m/^\d+$/
|
||||
|| !$self->get("value")
|
||||
|| $self->get("value") =~ m/^\d+$/) {
|
||||
my $formatValue = $self->getDefaultValue || $self->getOriginalValue;
|
||||
if (!$formatValue || $formatValue =~ m/^\d+$/) {
|
||||
return $self->session->datetime->epochToHuman($self->getOriginalValue,"%z %Z");
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue