Merge branch 'master' of git.st.unitedknowledge.org:webgui_newsletter

This commit is contained in:
Martin Kamerbeek 2010-10-13 10:52:57 +02:00
commit 36edb4d00a

View file

@ -442,9 +442,12 @@ sub www_edit {
$properties->{ value } = $configuration->{ $name } if exists $configuration->{ $name };
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 || $properties->{ managerCanEdit }
? $formField->toHtml
: $formField->getValueAsHtml
? $element
: $readonly
;
$f->readOnly(