X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FAdmin%2FUsers%2FModify.html;h=9198cbe7801e8cdd0e4b582ada69e5ac43cbb5bd;hp=8a24f9c4a48f3e4e9b29d792b59d78a26d2f20e8;hb=ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4;hpb=a513c0bef534d05f03c1242831b6f3be19b97dae diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html index 8a24f9c4a..9198cbe78 100644 --- a/rt/html/Admin/Users/Modify.html +++ b/rt/html/Admin/Users/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -52,188 +54,189 @@ <& /Elements/ListActions, actions => \@results &> -
+ %if ($Create) { - + % } else { - + % } - - +
+ - + + - + - -
-<& /Elements/TitleBoxStart, title => loc('Identity') &> + +<&| /Widgets/TitleBox, title => loc('Identity') &> - - +
+ + - + - + - + - + - + - + -
<&|/l&>Username: - - <&|/l&>(required) -
+ + <&|/l&>(required) +
<&|/l&>Email: - - -
+ + +
<&|/l&>Real Name: - - -
+ + +
<&|/l&>Nickname: - - -
+ + +
<&|/l&>Unix login: - - -
+ + +
<&|/l&>Language: - + <& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &> -
+
<&|/l&>Extra info: - - -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Access control') &> - -> -<&|/l&>Let this user access RT
- - - -> <&|/l&>Let this user be granted rights
+
+ +
+ +
+<&| /Widgets/TitleBox, title => loc('Access control') &> + + /> +<&|/l&>Let this user access RT
+ + + + /> <&|/l&>Let this user be granted rights
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { - - - + + +
+ + + - - - + + + - - -
<&|/l&>New Password: - - -
+ + +
<&|/l&>Retype Password: - - -
+
+ +
% } -<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Location') &> - - - + +
+ +<&| /Widgets/TitleBox, title => loc('Location') &> + + - + - + - + - + - + - + -
<&|/l&>Organization: - - -
+ + +
<&|/l&>Address1: - - -
+ + +
<&|/l&>Address2: - - -
+ + +
<&|/l&>City: - - + + -
+
<&|/l&>State: - - + + -
+
<&|/l&>Zip: - - -
+ + +
<&|/l&>Country: - - -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &> - - +
+ + +
+ +
+<&| /Widgets/TitleBox, title => loc('Phone numbers') &> + + - + - + - + - - - -
<&|/l&>Residence: - -
-
+ +
+
<&|/l&>Work: - -
-
+ +
+
<&|/l&>Mobile: - -
-
+ +
+
<&|/l&>Pager: - -
-<& /Elements/TitleBoxEnd &> -
-
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &> - + +
+
+
+ +
+<&| /Widgets/TitleBox, title => loc('Custom Fields') &> + % my $CFs = $UserObj->CustomFields; % while (my $CF = $CFs->Next) { - +% } else { +<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &> +% } + % } - - -
+
<% $CF->Name %>: - + +% if ($UserObj->id) { <& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &> -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Comments about this user') &> - -<& /Elements/TitleBoxEnd &> +
+ +
+<&| /Widgets/TitleBox, title => loc('Comments about this user') &> + + %if ($UserObj->Privileged) { -
-<& /Elements/TitleBoxStart, title => loc('Signature') &> - -<& /Elements/TitleBoxEnd &> +
+<&| /Widgets/TitleBox, title => loc('Signature') &> + + % } -
+ + + <& /Elements/Submit, Label => loc('Save Changes') &>
@@ -289,12 +292,19 @@ else { if ($val) { push @results, $msg; + foreach my $key ( keys %ARGS) { + # Convert custom fields on the "new" object to custom fields on the one we've just created + if ($key =~ /^Object-RT::User-new-CustomField-(.*)$/) { + $ARGS{'Object-RT::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key}; + } + } + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); } else { push @results, loc('User could not be created: [_1]', $msg); } } else { - $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'"); - $val = $UserObj->Id(); + $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'"); + $val = $UserObj->Id(); } if ($val) {