PostText/templates/page/captcha.html.ep

31 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2023-08-05 03:14:09 -04:00
% layout 'default';
% title 'CAPTCHA';
% content_for open_graph => begin
<meta property="og:type" content="website">
<meta property="og:title" content="<%= title %>">
<meta property="og:description" content="What are you?">
% end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta name="twitter:description" content="What are you?">
% end
<h2 class="page-title"><%= title %></h2>
<form method="post" class="form-body">
<div class="form-field">
<% if (my $error = validation->error('answer')) { =%>
2023-08-05 15:22:02 -04:00
<p class="field-with-error">Should be a single number between
<%= $error->[2] %> and <%= $error->[3] %>.</p>
2023-08-05 03:14:09 -04:00
<% } =%>
2023-08-05 16:04:37 -04:00
<%= label_for answer => "What Roman numeral is this?: $roman_numeral" %>
2023-08-05 15:25:32 -04:00
<%= number_field 'answer', (
2023-10-15 22:30:01 -04:00
id => 'answer',
min => 1,
max => 9,
required => undef,
autofocus => undef
2023-08-05 03:14:09 -04:00
) %>
</div>
<%= hidden_field number => $roman_numeral, id => 'number' %>
2023-08-05 03:14:09 -04:00
<button type="submit" class="form-button">Answer</button>
</form>