%# %# $Id$ %# % layout 'default'; % title 'Maacom'; % use Mojo::Util qw(dumper); % my $u = $c->app->user; % my $name = $c->req->param('domain_name'); % my $domain_id = $c->req->param('domain_id') || 0; % my $profile = $u->domain_profile($domain_id); % if ($profile) { % my $cid = $u->domain_exist($name); % if ($cid) {
Domain <%= $name %> already exists
% } % unless ($cid) { % my $res = $u->domain_update($domain_id, name => $name); % if ($res) {
Domain <%= $name %> has been updated.
% } % unless ($res) {
Domain <%= $name %> was not updated.
% } % } % } % unless ($profile) {
Domain with id <%= $domain_id %> not exist
% } %#EOF