a couple bug fixes
This commit is contained in:
parent
fe45029a3a
commit
1f3dbbaca0
2 changed files with 27 additions and 26 deletions
|
|
@ -248,26 +248,6 @@ sub displayValue {
|
|||
return $self->getValueAsHtml;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 generateIdParameter ( name )
|
||||
|
||||
A class method that returns a value to be used as the autogenerated ID for this field instance. Unless overriden, it simply returns the name with "_formId" appended to it.
|
||||
|
||||
=head3 name
|
||||
|
||||
The name of the field.
|
||||
|
||||
=cut
|
||||
|
||||
sub generateIdParameter {
|
||||
my $class = shift;
|
||||
my $name = shift;
|
||||
return $name."_formId";
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 fixMacros ( string )
|
||||
|
|
@ -345,6 +325,26 @@ sub fixTags {
|
|||
return $value;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 generateIdParameter ( name )
|
||||
|
||||
A class method that returns a value to be used as the autogenerated ID for this field instance. Unless overriden, it simply returns the name with "_formId" appended to it.
|
||||
|
||||
=head3 name
|
||||
|
||||
The name of the field.
|
||||
|
||||
=cut
|
||||
|
||||
sub generateIdParameter {
|
||||
my $class = shift;
|
||||
my $name = shift;
|
||||
return $name."_formId";
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 get ( var )
|
||||
|
|
@ -419,10 +419,9 @@ Returns the either the "value" or "defaultValue" passed in to the object in that
|
|||
|
||||
sub getOriginalValue {
|
||||
my $self = shift;
|
||||
my $value = $self->get("value");
|
||||
return $value if (defined $value);
|
||||
return $self->getDefaultValue();
|
||||
return $self->get("value") || $self->getDefaultValue();
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDefaultValue ( )
|
||||
|
|
|
|||
|
|
@ -175,9 +175,11 @@ sub getValue {
|
|||
my $self = shift;
|
||||
my $value = $self->get("value");
|
||||
my $storage = WebGUI::Storage->get($self->session,$value);
|
||||
foreach my $file (@{$storage->getFiles}) {
|
||||
if ($self->session->form->param($self->privateName('delete_'.$file))) {
|
||||
$storage->deleteFile($file);
|
||||
if (defined $storage) {
|
||||
foreach my $file (@{$storage->getFiles}) {
|
||||
if ($self->session->form->param($self->privateName('delete_'.$file))) {
|
||||
$storage->deleteFile($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($self->session->form->param($self->privateName('action')) eq 'keep') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue