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

% use Mojo::Util qw(dumper);

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

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

% if ($profile) {
    % my $domain_name = $profile->{name};
    % my $quota = $profile->{quota} || 0;

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

            <form accept-charset="UTF-8" action="/domain/update/handler" method="post" data-abide novalidate>
                <h5 class="text-center">Edit domain</h5>
                <input type="hidden" name="domain_id" value="<%= $domain_id %>"/>
                <label>Quota
                    <input type="number" name="quota" value="<%= $quota %>" required pattern="[0-9]{1,15}"/>
                    <span class="form-error">Mandatory, one or more ciphers</span>
                </label>
                <div class="text-center">
                    <button type="submit" class="button">Accept</button>
                    <a class="button" href="/domain/list">Escape</a>
                </div>
            </form>

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

% unless ($profile) {
        <div class="callout warning">Domain with id <%= $domain_id %> not exist</div>
% }


%#EOF
