I literally have no idea how this worked before, it's so late and my brain is fried

This commit is contained in:
swag 2022-09-17 03:56:07 -04:00
parent 18515197df
commit 8be78a2e31
2 changed files with 14 additions and 14 deletions

View File

@ -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">

View File

@ -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">