summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-22 22:41:32 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-22 22:41:32 +0000
commitfb3428428330dde7d2757317c4a7ac4e7e9a2e9b (patch)
tree13ab16aeba5f4260c75d021dc91caba935a5e9a0 /scripts
parent61ea910a5ba61a7c5eed2d679d1f25c431c449a8 (diff)
Fixes to user management
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2332 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'scripts')
-rw-r--r--scripts/admin.pl33
1 files changed, 11 insertions, 22 deletions
diff --git a/scripts/admin.pl b/scripts/admin.pl
index a9e11177..9a09f40f 100644
--- a/scripts/admin.pl
+++ b/scripts/admin.pl
@@ -76,20 +76,20 @@ sub edit_user {
path=>'UI'
);
+ my $template_data =
+ {
+ user=>$user,
+ roles=>@all_roles,
+ countries=>$admin->get_countries(),
+ user_roles=>$user->{roles},
+ salutations=>$admin->get_salutations(),
+ locations=>$location->get_all($u_id,"person"),
+ };
if ($request->type() eq 'POST') {
$admin->save_user();
$admin->save_roles();
- $template->render(
- {
- user=>$admin->get_entire_user(),
- roles=>$all_roles,
- user_roles=>$admin->get_user_roles($request->{username}),
- salutations=>$admin->get_salutations(),
- locations=>$location->get_all($u_id,"person"),
- countries=>$admin->get_countries(),
- }
- );
+ $template->render($test_data);
}
else {
# print STDERR Dumper($user);
@@ -99,18 +99,7 @@ sub edit_user {
if ($request->{location_id}) {
$loc = $location->get($request->{location_id});
}
- print STDERR Dumper($admin->get_salutations());
- $template->render(
- {
- user=>$user,
- roles=>@all_roles,
- user_roles=>$user->{roles},
- salutations=>$admin->get_salutations(),
- location=>$loc,
- locations=>$location->get_all($u_id,"person"),
- countries=>$admin->get_countries(),
- }
- );
+ $template->render($template_data);
}
}