restore multiple attachments
This commit is contained in:
parent
268947c1d5
commit
81789c2275
1 changed files with 9 additions and 1 deletions
|
|
@ -51,6 +51,11 @@ The following additional parameters have been added via this sub class.
|
|||
|
||||
If no name is specified a default name of "file" will be used.
|
||||
|
||||
=head4 maxAttachments
|
||||
|
||||
How many attachments will be allowed to be uploaded. However, the file form
|
||||
only supports displaying/deleting 1 attachment.
|
||||
|
||||
=head4 profileEnabled
|
||||
|
||||
Flag that tells the User Profile system that this is a valid form element in a User Profile
|
||||
|
|
@ -69,6 +74,9 @@ sub definition {
|
|||
name=>{
|
||||
defaultValue=>"file"
|
||||
},
|
||||
maxAttachments=>{
|
||||
defaultValue=>1
|
||||
},
|
||||
profileEnabled=>{
|
||||
defaultValue=>1
|
||||
},
|
||||
|
|
@ -184,7 +192,7 @@ sub toHtml {
|
|||
my $i18n = WebGUI::International->new($self->session);
|
||||
$uploadControl .= sprintf q!var uploader = new FileUploadControl("%s", fileIcons, "%s","%d");
|
||||
uploader.addRow();
|
||||
</script>!, $self->get("name"), $i18n->get("removeLabel"), 1;
|
||||
</script>!, $self->get("name"), $i18n->get("removeLabel"), $self->get('maxAttachments');
|
||||
$uploadControl .= WebGUI::Form::Hidden->new($self->session, {-name => $self->privateName('action'), -value => 'upload'})->toHtml();
|
||||
return $uploadControl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue