ProfileFields were missing extras from their properties. Fixes bug #12102.

This commit is contained in:
Colin Kuskie 2011-04-22 08:59:14 -07:00
parent ef08d0d481
commit 3982b7ee39
3 changed files with 21 additions and 1 deletions

View file

@ -1,6 +1,7 @@
7.10.15
- fixed #12117: Thingy - www_searchViaAjax broken
- fixed #12116: JsonTable form control needs i18n
- fixed #12102: User profiling field extras information
7.10.14
- fixed #12094: Cannot enter in Macros in URLs inside TinyMCE.

View file

@ -254,6 +254,7 @@ sub formProperties {
$properties{ options } = $orderedValues;
$properties{ forceImageOnly } = $self->get("forceImageOnly");
$properties{ dataDefault } = $self->get("dataDefault");
$properties{ extras } = $self->get("extras");
return \%properties;
}

View file

@ -34,7 +34,7 @@ WebGUI::Test->addToCleanup($newUser);
#----------------------------------------------------------------------------
# Tests
plan tests => 56; # Increment this number for each test you create
plan tests => 58; # Increment this number for each test you create
#----------------------------------------------------------------------------
# Test the creation of ProfileField
@ -214,6 +214,24 @@ is ($newProfileField3->get('required'), 1, 'set required = 1');
is ($newProfileField3->get('editable'), 1, '... editable = 1');
$newProfileField3->delete;
###########################################################
#
# form fields, extras, form properties
#
###########################################################
my $extra_field = WebGUI::ProfileField->create($session, 'textual',
{
label => 'Textual',
fieldName => 'Textual',
extras => q|class="texted"|,
}
);
is $extra_field->get('extras'), q|class="texted"|, 'extras set on field creation';
is $extra_field->formProperties->{extras}, q|class="texted"|, 'extras available from formProperties';
$extra_field->delete;
sub installPigLatin {
use File::Copy;