%#
%# $Id$
%#
% layout 'default';
% title 'Maacom';

% use Mojo::Util qw(dumper);

% my $u = $c->app->user;

% my $alias_id = $c->req->param('alias_id') || 0;
% my $profile = $u->alias_profile($alias_id);

% if ($profile) {
    % my $alias_name = $profile->{name};
    % my $domain_name = $profile->{domain_name};
    % my $domain_id = $profile->{domain_id};
    % my $address = $profile->{address};

    <div class="grid-container">
        <div class="grid-x grid-padding-x">
          <div class="medium-6 medium-centered cell">

            <form accept-charset="UTF-8" action="/alias/delete/handler" method="post" data-abide novalidate>
                <h5 class="text-center">Delete alias <%= $address %></h5>
                <input type="hidden" name="alias_id" value="<%= $alias_id %>"/>
                <div class="text-center">
                    <button type="submit" class="button">Accept</button>
                    <a class="button" href="/alias/list?domain_id=<%= $domain_id %>">Escape</a>
                </div>
            </form>

          </div>
        </div>
    </div>
% }

% unless ($profile) {
        <div class="callout warning">Alias with id <%= $alias_id %> not exist</div>
% }
%#EOF
