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;
|
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 )
|
=head2 fixMacros ( string )
|
||||||
|
|
@ -345,6 +325,26 @@ sub fixTags {
|
||||||
return $value;
|
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 )
|
=head2 get ( var )
|
||||||
|
|
@ -419,10 +419,9 @@ Returns the either the "value" or "defaultValue" passed in to the object in that
|
||||||
|
|
||||||
sub getOriginalValue {
|
sub getOriginalValue {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $value = $self->get("value");
|
return $self->get("value") || $self->getDefaultValue();
|
||||||
return $value if (defined $value);
|
|
||||||
return $self->getDefaultValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getDefaultValue ( )
|
=head2 getDefaultValue ( )
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,11 @@ sub getValue {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $value = $self->get("value");
|
my $value = $self->get("value");
|
||||||
my $storage = WebGUI::Storage->get($self->session,$value);
|
my $storage = WebGUI::Storage->get($self->session,$value);
|
||||||
foreach my $file (@{$storage->getFiles}) {
|
if (defined $storage) {
|
||||||
if ($self->session->form->param($self->privateName('delete_'.$file))) {
|
foreach my $file (@{$storage->getFiles}) {
|
||||||
$storage->deleteFile($file);
|
if ($self->session->form->param($self->privateName('delete_'.$file))) {
|
||||||
|
$storage->deleteFile($file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($self->session->form->param($self->privateName('action')) eq 'keep') {
|
if ($self->session->form->param($self->privateName('action')) eq 'keep') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue