Work around bu in template form plugin in wg < 7.9.8
This commit is contained in:
parent
3deab86677
commit
647d0b7f20
1 changed files with 4 additions and 2 deletions
|
|
@ -442,9 +442,11 @@ sub www_edit {
|
||||||
$properties->{ value } = $configuration->{ $name } if exists $properties->{ value };
|
$properties->{ value } = $configuration->{ $name } if exists $properties->{ value };
|
||||||
|
|
||||||
my $formField = WebGUI::Form::DynamicField->new( $session, %{ $properties } );
|
my $formField = WebGUI::Form::DynamicField->new( $session, %{ $properties } );
|
||||||
|
my $element = $formField->toHtml; # Works around a bug in WG::Form::Template in < 7.9.8
|
||||||
|
my $readonly = $formField->getValueAsHtml; # where getValueAsHtml wouldn't set the correct options hashref
|
||||||
my $html = $self->admin->canOverride
|
my $html = $self->admin->canOverride
|
||||||
? $formField->toHtml
|
? $element
|
||||||
: $formField->getValueAsHtml
|
: $readonly
|
||||||
;
|
;
|
||||||
|
|
||||||
$f->readOnly(
|
$f->readOnly(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue