Work around bu in template form plugin in wg < 7.9.8

This commit is contained in:
root 2010-09-30 17:17:26 +02:00
parent 3deab86677
commit 647d0b7f20

View file

@ -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(