remove Combo from Thingy, and let it autodetect List type form fields like the dataform does
This commit is contained in:
parent
5e14b1d978
commit
bb5ced3e0d
2 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
7.6.7
|
||||
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
||||
|
||||
7.6.6
|
||||
- fixed #8792: Image Preview gives ERROR in Collateral Manager
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ sub getFormElement {
|
|||
}
|
||||
}
|
||||
|
||||
if (WebGUI::Utility::isIn($data->{fieldType},qw(SelectList CheckList SelectBox Attachments Combo))) {
|
||||
if (WebGUI::Utility::isIn($data->{fieldType},qw(SelectList CheckList SelectBox Attachments))) {
|
||||
my @defaultValues;
|
||||
if ($self->session->form->param($name)) {
|
||||
@defaultValues = $self->session->form->selectList($name);
|
||||
|
|
@ -876,7 +876,9 @@ sub getFormElement {
|
|||
$param{value} = \@defaultValues;
|
||||
}
|
||||
|
||||
if (WebGUI::Utility::isIn($data->{fieldType},qw(SelectList SelectBox CheckList RadioList SelectSlider Combo))) {
|
||||
my $class = 'WebGUI::Form::'. ucfirst $data->{fieldType};
|
||||
eval { WebGUI::Pluggable::load($class) };
|
||||
if ($class->isa('WebGUI::Form::List')) {
|
||||
delete $param{size};
|
||||
|
||||
my $values = WebGUI::Operation::Shared::secureEval($self->session,$data->{possibleValues});
|
||||
|
|
@ -930,7 +932,7 @@ sub getFormElement {
|
|||
$param{value} = $data->{value} || $data->{defaultValue};
|
||||
}
|
||||
|
||||
my $formElement = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::". ucfirst $param{fieldType}, "new", [$self->session, \%param ])};
|
||||
my $formElement = eval { WebGUI::Pluggable::instanciate($class, "new", [$self->session, \%param ])};
|
||||
return $formElement->toHtml();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue