From d8ae4529e95c0d6aff1f0a4cbb70803d06655ca3 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 19 Dec 2021 00:43:18 -0500 Subject: [PATCH] Some small style tweaks --- guestbook-ng.pl | 4 ++-- templates/sign.html.ep | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guestbook-ng.pl b/guestbook-ng.pl index 9b16f26..3541afd 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -15,7 +15,7 @@ plugin 'TagHelpers::Pagination'; # Helpers helper pg => sub { - my $env = app->mode eq 'development' ? 'dev_env' : 'prod_env'; + my $env = app->mode() eq 'development' ? 'dev_env' : 'prod_env'; state $pg = Mojo::Pg->new( 'postgres://' . @@ -57,7 +57,7 @@ get '/' => sub ($c) { $c->render(); } => 'index'; -any '/sign' => sub ($c) { +any [qw{GET POST}], '/sign' => sub ($c) { if ($c->req->method() eq 'POST') { my $name = $c->param('name'); my $message = $c->param('message'); diff --git a/templates/sign.html.ep b/templates/sign.html.ep index 9fb63cd..0b48eef 100644 --- a/templates/sign.html.ep +++ b/templates/sign.html.ep @@ -12,7 +12,7 @@ <%= text_area 'message', cols => 40, rows => 6 %> - Swagg CAPTCHA™: + SwaggCAPTCHA™: <%= radio_button answer => 0 %> <%= label_for answer => "I don\'t want to post" %> @@ -22,7 +22,7 @@   <%= radio_button answer => "false" %> - <%= label_for answer => "I\'m ready to post" %> + <%= label_for answer => "I\'m ready to post (choose this one)" %>