I literally have no idea how this worked before, it's so late and my brain is fried
This commit is contained in:
parent
18515197df
commit
8be78a2e31
|
@ -2,15 +2,15 @@
|
|||
% title 'New Thread';
|
||||
<h2><%= title %></h2>
|
||||
<form method="post">
|
||||
<div class="name field">
|
||||
<%= label_for name => 'Author' %>
|
||||
<% if (my $previous_name = session->{'author'}) { %>
|
||||
<%= text_field name => $previous_name, maxlength => 63, minlength => 1 %>
|
||||
<div class="author field">
|
||||
<%= label_for author => 'Author' %>
|
||||
<% if (my $previous_author = session->{'author'}) { %>
|
||||
<%= text_field author => $previous_author, maxlength => 63, minlength => 1 %>
|
||||
<% } else { %>
|
||||
<%= text_field name => 'Anonymous', maxlength => 63, minlength => 1 %>
|
||||
<%= text_field author => 'Anonymous', maxlength => 63, minlength => 1 %>
|
||||
<% } %>
|
||||
<% if (my $error = validation->error('name')) { =%>
|
||||
<p class="field-with-error">Invalid name: 1 to 63 characters please.</p>
|
||||
<% if (my $error = validation->error('author')) { =%>
|
||||
<p class="field-with-error">Invalid author: 1 to 63 characters please.</p>
|
||||
<% } =%>
|
||||
</div>
|
||||
<div class="title field">
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
% title 'New Remark';
|
||||
<h2><%= title %></h2>
|
||||
<form method="post">
|
||||
<div class="name field">
|
||||
<%= label_for name => 'Author' %>
|
||||
<% if (my $previous_name = session->{'author'}) { %>
|
||||
<%= text_field name => $previous_name, maxlength => 63, minlength => 1 %>
|
||||
<div class="author field">
|
||||
<%= label_for author => 'Author' %>
|
||||
<% if (my $previous_author = session->{'author'}) { %>
|
||||
<%= text_field author => $previous_author, maxlength => 63, minlength => 1 %>
|
||||
<% } else { %>
|
||||
<%= text_field name => 'Anonymous', maxlength => 63, minlength => 1 %>
|
||||
<%= text_field author => 'Anonymous', maxlength => 63, minlength => 1 %>
|
||||
<% } %>
|
||||
<% if (my $error = validation->error('name')) { =%>
|
||||
<p class="field-with-error">Invalid name: 1 to 63 characters please.</p>
|
||||
<% if (my $error = validation->error('author')) { =%>
|
||||
<p class="field-with-error">Invalid author: 1 to 63 characters please.</p>
|
||||
<% } =%>
|
||||
</div>
|
||||
<div class="text field">
|
||||
|
|
Loading…
Reference in a new issue