From c7e5d5ee24fa612fa7c886793340b414b62bb493 Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Tue, 2 May 2006 12:09:03 +0000 Subject: [PATCH] Fixed [ 1479779 ] enable select box in dataform --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/DataForm.pm | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 465d903c2..2e8a0fead 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -133,6 +133,7 @@ - fix [ 1473937 ] scratch->set not taking. - fix [ 1471909 ] createAccountSave not called - no validate email (Martin Kamerbeek / Procolix) + - fix [ 1479779 ] enable select box in dataform (Martin Kamerbeek / Procolix) - Added a graphing engine and tied it into the Poll asset (Martin Kamerbeek / Procolix) 6.8.8 diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index 3e97aa73d..0abeaaa34 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -45,7 +45,7 @@ sub _createField { if ($data->{type} eq "checkbox") { $param{value} = ($data->{defaultValue} =~ /checked/i) ? 1 : ""; } - if (isIn($data->{type},qw(selectList checkList))) { + if (isIn($data->{type},qw(selectList checkList selectBox))) { my @defaultValues; if ($self->session->form->param($name)) { @defaultValues = $self->session->form->selectList($name); @@ -57,7 +57,7 @@ sub _createField { } $param{value} = \@defaultValues; } - if (isIn($data->{type},qw(selectList checkList radioList))) { + if (isIn($data->{type},qw(selectList selectBox checkList radioList))) { delete $param{size}; my %options; tie %options, 'Tie::IxHash'; @@ -829,7 +829,7 @@ sub www_editField { -label=>$i18n->get(23), -hoverHelp=>$i18n->get('23 description'), -value=>$field{type} || "text", - -types=>[qw(dateTime TimeField float zipcode text textarea HTMLArea url date email phone integer yesNo selectList radioList checkList)] + -types=>[qw(dateTime TimeField float zipcode text textarea HTMLArea url date email phone integer yesNo selectList radioList checkList selectBox)] ); $f->integer( -name=>"width", @@ -1075,7 +1075,7 @@ sub www_process { my $self = shift; return $self->session->privilege->insufficient() unless $self->canView; my $entryId = $self->setCollateral("DataForm_entry","DataForm_entryId",{ - DataForm_entryId=>$self->session->form->process("entryId"), + DataForm_entryId=>$self->session->form->process("entryId") || undef, assetId=>$self->getId, userId=>$self->session->user->userId, username=>$self->session->user->username,