47 lines
1.1 KiB
Perl
47 lines
1.1 KiB
Perl
%#
|
|
%# $Id$
|
|
%#
|
|
% layout 'default';
|
|
% title 'Maacom';
|
|
|
|
% use Mojo::Util qw(dumper);
|
|
|
|
% my $u = $c->app->user;
|
|
|
|
% my $user_id = $c->req->param('user_id') || 0;
|
|
% my $password = $c->req->param('password');
|
|
% my $quota = $c->req->param('quota');
|
|
|
|
% my $profile = $u->user_profile($user_id);
|
|
|
|
% if ($profile) {
|
|
% my $domain_id = $profile->{domain_id};
|
|
% my $domain_name = $profile->{domain_name};
|
|
% my $address = $profile->{address};
|
|
% my $quota = $quota || $profile->{quota};
|
|
|
|
% my $res = $u->user_update($user_id, password => $password, quota => $quota);
|
|
% if ($res) {
|
|
<div class="callout success">User <%= $address %> has been updated.</div>
|
|
% }
|
|
% unless ($res) {
|
|
<div class="callout alert">User <%= $address %> was not updated.</div>
|
|
% }
|
|
<a class="float-left button tiny" href="/user/list?domain_id=<%= $domain_id %>">
|
|
<i class="fi-arrow-left"></i>
|
|
</a>
|
|
% }
|
|
|
|
% unless ($profile) {
|
|
<div class="callout warning">User with id <%= $user_id %> not exist</div>
|
|
<a class="float-left button tiny" href="/user/list">
|
|
<i class="fi-arrow-left"></i>
|
|
</a>
|
|
% }
|
|
|
|
%#EOF
|
|
|
|
|
|
|
|
|