Skip to content
Permalink
Browse files

use AssetAspect::UploadFiles.

fixes "Can't locate object method "whatNext" via package "WebGUI::FormBuilder::Tab" at /data/WebGUI8/lib/WebGUI/Asset/Wobject/Folder.pm line 165.", but doesn't actually manage to upload files.
  • Loading branch information...
scottwalters committed Jun 22, 2012
1 parent 1ee0668 commit c042f439238f76bcc27d2621898ea9157ca57810
Showing with 11 additions and 10 deletions.
  1. +11 −10 lib/WebGUI/Asset/Wobject/Folder.pm
@@ -162,14 +162,15 @@ override getEditForm => sub {
my $tabform = super();
my $i18n = WebGUI::International->new($self->session,"Asset_Folder");
if ($self->get("assetId") eq "new") {
$tabform->getTab("properties")->whatNext(
-options=>{
view=>$i18n->get(823),
"viewParent"=>$i18n->get(847)
},
-value=>"view"
);
}
$tabform->getTab("properties")->addField(
'whatNext',
-options=>{
view=>$i18n->get(823),
"viewParent"=>$i18n->get(847)
},
-value=>"view"
);
}
return $tabform;
};

@@ -187,7 +188,8 @@ sub getTemplateVars {
my $i18n = WebGUI::International->new($self->session, 'Asset_Folder');

$vars->{ 'addFile.label' } = $i18n->get('add file label');
$vars->{ 'addFile.url' } = $self->getUrl('func=add;className=WebGUI::Asset::FilePile');
# $vars->{ 'addFile.url' } = $self->getUrl('func=add;className=WebGUI::Asset::FilePile');
$vars->{ 'addFile.url' } = $self->getUrl('op=assetHelper;assetId=' . $self->getId . ';helperId=upload_files;method=uploadFiles');
$vars->{ canEdit } = $self->canEdit;
$vars->{ canAddFile } = $self->canEdit;

@@ -341,7 +343,6 @@ override www_view => sub {
super();
};


__PACKAGE__->meta->make_immutable;
1;

0 comments on commit c042f43

Please sign in to comment.
You can’t perform that action at this time.