Files
maacom/templs/unwanted-update-form.html.ep
ziggi e58c4a4820
2017-12-12 18:51:27 +00:00

45 lines
1.3 KiB
Perl

%#
%# $Id$
%#
% layout 'default';
% title 'Maacom';
% use Mojo::Util qw(dumper);
% my $u = $c->app->user;
% my $unwanted_id = $c->req->param('unwanted_id') || 0;
% my $profile = $u->unwanted_profile($unwanted_id);
% if ($profile) {
% my $unwanted_name = $profile->{name};
<div class="grid-container">
<div class="grid-x grid-padding-x">
<div class="medium-6 medium-centered cell">
<form accept-charset="UTF-8" action="/unwanted/update/handler" method="post" data-abide novalidate>
<h5 class="text-center">Edit host</h5>
<input type="hidden" name="unwanted_id" value="<%= $unwanted_id %>"/>
<label>Host name
<input type="text" value="<%= $unwanted_name %>" name="unwanted_name" required pattern="[_.-zA-Z0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{5,42}"/>
<span class="form-error">Mandatory, 5 or more letter</span>
</label>
<div class="text-center">
<button type="submit" class="button">Accept</button>
<a class="button" href="/unwanted/list">Escape</a>
</div>
</form>
</div>
</div>
</div>
% }
% unless ($profile) {
<div class="callout warning">Host with id <%= $unwanted_id %> not exist</div>
% }
%#EOF