Merge commit '469c2b72b4' into WebGUI8. All tests passing.
This commit is contained in:
commit
565cf955d7
147 changed files with 1526 additions and 1283 deletions
|
|
@ -211,8 +211,9 @@ sub appendTemplateVarsFileLoop {
|
|||
my $assetIds = shift;
|
||||
my $session = $self->session;
|
||||
|
||||
for my $assetId (@$assetIds) {
|
||||
my $asset = WebGUI::Asset->newById($session, $assetId);
|
||||
ASSET: for my $assetId (@$assetIds) {
|
||||
my $asset = eval { WebGUI::Asset->newById($session, $assetId); };
|
||||
next ASSET if Exception::Class->caught();
|
||||
# Set the parent
|
||||
$asset->{_parent} = $self;
|
||||
push @{$var->{file_loop}}, $asset->getTemplateVars;
|
||||
|
|
|
|||
|
|
@ -288,9 +288,14 @@ sub getFolder {
|
|||
##For a fully automatic commit, save the current tag, create a new one
|
||||
##with the commit without approval workflow, commit it, then restore
|
||||
##the original if it exists
|
||||
my $oldVersionTag = WebGUI::VersionTag->getWorking($session, 'noCreate');
|
||||
my $newVersionTag = WebGUI::VersionTag->create($session, { workflowId => 'pbworkflow00000000003', });
|
||||
$newVersionTag->setWorking;
|
||||
my ($oldVersionTag, $newVersionTag);
|
||||
$oldVersionTag = WebGUI::VersionTag->getWorking($session, 'noCreate');
|
||||
|
||||
if ($self->hasBeenCommitted) {
|
||||
$newVersionTag = WebGUI::VersionTag->create($session, { workflowId => 'pbworkflow00000000003', });
|
||||
$newVersionTag->setWorking;
|
||||
$newVersionTag->set({ name => 'Adding folder '. $folderName. ' to archive '. $self->getUrl});
|
||||
}
|
||||
|
||||
##Call SUPER because my addChild calls getFolder
|
||||
$folder = $self->addChild({
|
||||
|
|
@ -301,7 +306,7 @@ sub getFolder {
|
|||
isHidden => 1,
|
||||
styleTemplateId => $self->styleTemplateId,
|
||||
});
|
||||
$newVersionTag->commit();
|
||||
$newVersionTag->commit() if $newVersionTag;
|
||||
##Restore the old one, if it exists
|
||||
$oldVersionTag->setWorking() if $oldVersionTag;
|
||||
|
||||
|
|
|
|||
|
|
@ -996,20 +996,8 @@ sub getFormPlugin {
|
|||
eval { WebGUI::Pluggable::load($class) };
|
||||
if ($class->isa('WebGUI::Form::List')) {
|
||||
delete $param{size};
|
||||
|
||||
my $values = WebGUI::Operation::Shared::secureEval($session,$data->{possibleValues});
|
||||
if (ref $values eq 'HASH') {
|
||||
$param{options} = $values;
|
||||
}
|
||||
else{
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
foreach (split(/\n/x, $data->{possibleValues})) {
|
||||
s/\s+$//x; # remove trailing spaces
|
||||
$options{$_} = $_;
|
||||
}
|
||||
$param{options} = \%options;
|
||||
}
|
||||
$param{options} = $values;
|
||||
}
|
||||
|
||||
if ($data->{fieldType} eq "YesNo") {
|
||||
|
|
@ -3238,7 +3226,7 @@ $self->session->form->process($_) eq "") {
|
|||
sequenceNumber');
|
||||
while (my $field = $fields->hashRef) {
|
||||
if ($field->{searchIn}){
|
||||
my $searchForm = $self->getFormElement($field);
|
||||
my $searchForm = $self->getFormPlugin($field, 1);
|
||||
my $searchTextForm = WebGUI::Form::Text($self->session, {
|
||||
name=>"field_".$field->{fieldId},
|
||||
size=>25,
|
||||
|
|
@ -3253,9 +3241,10 @@ sequenceNumber');
|
|||
push(@searchFields_loop, {
|
||||
"searchFields_fieldId" => $field->{fieldId},
|
||||
"searchFields_label" => $field->{label},
|
||||
"searchFields_form" => $searchForm,
|
||||
"searchFields_form" => $searchForm->toHtml,
|
||||
"searchFields_textForm" => $searchTextForm,
|
||||
"searchFields_is".$fieldType => 1,
|
||||
"searchFields_listType" => $searchForm->isa('WebGUI::Form::List'),
|
||||
});
|
||||
|
||||
my @searchValue = $session->form->process("field_".$field->{fieldId});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue