selectable templates for user profile view and edit

This commit is contained in:
Colin Kuskie 2008-06-13 05:07:12 +00:00
parent 0b2283d198
commit c7083c8177
6 changed files with 228 additions and 3 deletions

View file

@ -50,6 +50,8 @@ 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.
NOTE: You should use the getRequiredFields method in WebGUI::ProfileField instead.
=head3 session
The current WebGUI session object.
@ -230,7 +232,7 @@ sub www_editProfile {
$vars->{'profile.form.elements'} = \@array;
$vars->{'profile.form.submit'} = WebGUI::Form::submit($session,{});
$vars->{'profile.accountOptions'} = WebGUI::Operation::Shared::accountOptions($session);
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000051")->process($vars));
return $session->style->userStyle(WebGUI::Asset::Template->new($session, $session->setting->get('editUserProfileTemplate'))->process($vars));
}
#-------------------------------------------------------------------
@ -319,7 +321,7 @@ sub www_viewProfile {
};
}
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000052")->process($vars));
return $session->style->userStyle(WebGUI::Asset::Template->new($session, $session->setting->get('viewUserProfileTemplate'))->process($vars));
}

View file

@ -480,6 +480,22 @@ sub definition {
fieldType => 'HTMLArea',
label => $i18n->get( 'showMessageOnLoginBody label' ),
hoverHelp => $i18n->get( 'showMessageOnLoginBody description' ),
};
push @fields, {
tab => "user",
name => 'viewUserProfileTemplate',
fieldType => 'Template',
namespace => 'Operation/Profile/View',
label => $i18n->get( 'user profile view template' ),
hoverHelp => $i18n->get( 'user profile view template description' ),
};
push @fields, {
tab => "user",
name => 'editUserProfileTemplate',
fieldType => 'Template',
namespace => 'Operation/Profile/Edit',
label => $i18n->get( 'user profile edit template' ),
hoverHelp => $i18n->get( 'user profile edit template description' ),
};
# auth settings
my $options;