[rt-users] ShowCustomField in SelfService preference page
Admin
admin at libra-linux.com
Tue Feb 14 11:38:47 EST 2006
Hi,
Is it possible to configure rt to show Users CustomFields in their
preference for non-privilege users ?
Actually, only changing password title display in Self Service user
preference's page. I added the group right "ShowCustomField" in the User
CustomField global configuration, and added this level in the group my
users belongs to.
But nothing displays in SelfService preference pages....
If not possible, could someone help me inserting perl code in the
preferences page (SelfService/Prefs.html or in /Elements/Header, to make
available this function : Displaying all the User CustomField and their
value... without the possibility to edit them by the user himself.
i dont know perl coding, just tried several line like this but without
success (seeing the customfield name but no value ) :
--- SelfService/Prefs.html.save 2006-02-14 13:10:35.000000000 +0100
+++ SelfService/Prefs.html 2006-02-14 17:05:38.000000000 +0100
@@ -55,11 +55,32 @@
<& /Elements/TitleBoxEnd &>
<BR>
% }
+
+<& /Elements/TitleBoxStart, title => loc('Custom Fields') &>
+<TABLE>
+% my $CFs = $UserObj->CustomFields;
+% while (my $CF = $CFs->Next) {
+<TR VALIGN="TOP"><TD ALIGN="RIGHT">
+<% $CF->Name %>:
+</TD><TD>
+<& /Elements/ShowCustomFields, ,Object => $UserObj, CustomFields => $CF &>
+</TD></TR>
+% }
+<TR>
+</TR>
+</TABLE>
+<& /Elements/TitleBoxEnd &>
+
+
<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
<%INIT>
+my $UserObj = new RT::User($session{'CurrentUser'});
Thanks for your support
More information about the rt-users
mailing list