Profile field defaulting fixes.
This commit is contained in:
parent
4eb99cebfb
commit
aa3b8b6d24
4 changed files with 22 additions and 19 deletions
|
|
@ -351,10 +351,11 @@ sub www_editUser {
|
|||
foreach my $field (@{$category->getFields}) {
|
||||
next if $field->getId =~ /contentPositions/;
|
||||
my $label = $field->getLabel . ($field->isRequired ? "*" : '');
|
||||
my $defaultValue = WebGUI::Operation::Shared::secureEval($session, $field->get('dataDefault'));
|
||||
if ($field->getId eq "alias" && $u->userId eq '1') {
|
||||
$tabform->getTab("profile")->raw($field->formField({label=>$label},1,undef,1));
|
||||
$tabform->getTab("profile")->raw($field->formField({label=>$label, value=>$defaultValue},1,undef,1));
|
||||
} else {
|
||||
$tabform->getTab("profile")->raw($field->formField({label=>$label},1,$u));
|
||||
$tabform->getTab("profile")->raw($field->formField({label=>$label, value=>$defaultValue},1,$u));
|
||||
}
|
||||
}
|
||||
$tabform->getTab("profile")->fieldSetEnd($category->getLabel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue