PostText/templates/page/captcha.html.ep

30 lines
1.0 KiB
Plaintext
Raw 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')) { =%>
<p class="field-with-error">Must be between <%= $error->[2] %>
and <%= $error->[3] %> characters.</p>
<% } =%>
<%= label_for answer => "What roman numeral is this?: $roman_numeral" %>
2023-08-05 03:14:09 -04:00
<%= text_field 'answer', (
id => 'answer',
maxlength => 1,
minlength => 1,
required => undef
) %>
</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>