Implement RFE "Non Required Fields on User Registration". Associated upgrade.

Minor streamlining of profile field listing methods.

WebGUI::Operation::Profile::getRequiredProfileFields is now deprecated,
because it's specific enough to be not significantly more useful than
WebGUI::ProfileField::getRequiredFields, and because with this change
nothing in core uses it anymore.
This commit is contained in:
Drake 2006-11-22 23:50:00 +00:00
parent 2843dd195b
commit ca9d90c577
7 changed files with 106 additions and 43 deletions

View file

@ -45,6 +45,10 @@ These methods are available from this package:
Returns an array of hashes for required profile fields. This array is ready
to be used as template variables in the WebGUI template system.
This method is deprecated, and should not be used in new code. Use
the getRequiredFields method from WebGUI::ProfileField and specify the
translation to template variables directly instead.
=head3 session
The current WebGUI session object.

View file

@ -266,6 +266,12 @@ sub www_editProfileField {
-hoverHelp=>$i18n->get('474 description'),
-value=>$data->{required}
);
$f->yesNo(
-name => 'showAtRegistration',
-label => $i18n->get('showAtRegistration label'),
-hoverHelp => $i18n->get('showAtRegistration hoverHelp'),
-value => $data->{showAtRegistration}
);
if ($data->{fieldType} eq "Image") {
$f->yesNo(
-name=>"forceImageOnly",
@ -336,6 +342,7 @@ sub www_editProfileFieldSave {
editable=>$session->form->yesNo("editable"),
visible=>$session->form->yesNo("visible"),
required=>$session->form->yesNo("required"),
showAtRegistration=>$session->form->yesNo("showAtRegistration"),
possibleValues=>$session->form->textarea("possibleValues"),
dataDefault=>$session->form->textarea("dataDefault"),
fieldType=>$session->form->fieldType("fieldType"),