Add POD to the ProfileField, formField method.
Fix all profile field defaults being ignored by the createAccount screen.
This commit is contained in:
parent
02acf13d48
commit
33564cee94
3 changed files with 16 additions and 3 deletions
|
|
@ -116,6 +116,7 @@
|
|||
- fix: too small of a field for content profiling
|
||||
- fix: Wrong class assignment in "News" template
|
||||
- fix: malformed css in default wiki page
|
||||
- fix: User profiling default broken
|
||||
|
||||
7.5.10
|
||||
- fix: Syntax error in GetCsMail
|
||||
|
|
|
|||
|
|
@ -194,20 +194,23 @@ sub createAccount {
|
|||
foreach my $field (@{WebGUI::ProfileField->getRegistrationFields($self->session)}) {
|
||||
my $id = $field->getId;
|
||||
my $label = $field->getLabel;
|
||||
my $defaultValue = undef;
|
||||
|
||||
# Get the default email from the invitation
|
||||
my $formField;
|
||||
if ($field->get('fieldName') eq "email" && $userInvitation ) {
|
||||
my $code = $self->session->form->get('code')
|
||||
|| $self->session->form->get('uniqueUserInvitationCode');
|
||||
$defaultValue
|
||||
my $defaultValue
|
||||
= $self->session->db->quickScalar(
|
||||
'SELECT email FROM userInvitations WHERE inviteId=?',
|
||||
[$code]
|
||||
);
|
||||
$vars->{'create.form.header'} .= WebGUI::Form::hidden($self->session, {name=>"uniqueUserInvitationCode", value=>$code});
|
||||
$formField = $field->formField(undef, undef, undef, undef, $defaultValue);
|
||||
}
|
||||
else {
|
||||
$formField = $field->formField();
|
||||
}
|
||||
my $formField = $field->formField(undef, undef, undef, undef, $defaultValue);
|
||||
my $required = $field->isRequired;
|
||||
|
||||
# Old-style field loop.
|
||||
|
|
|
|||
|
|
@ -217,6 +217,15 @@ An integer indicating whether to return just the field's form input, or the fiel
|
|||
|
||||
A WebGUI::User object reference to use instead of the currently logged in user.
|
||||
|
||||
=head3 skipDefault
|
||||
|
||||
If true, this causes the default value set up for the form field to be ignored.
|
||||
|
||||
=head3 assignedValue
|
||||
|
||||
If assignedValue is defined, it will be used to override the default value set up for the
|
||||
form.
|
||||
|
||||
=cut
|
||||
|
||||
sub formField {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue