Push error flash code into _err_msg.html.ep

This commit is contained in:
ngoomie 2024-08-24 01:06:51 -06:00
parent f0073d1f1f
commit 75ca0aba0f
7 changed files with 15 additions and 15 deletions

View File

@ -19,7 +19,9 @@ sub index {
$c->render( $c->render(
template => 'index', template => 'index',
category_tree => $c->model('forums')->list_full category_tree => $c->model('forums')->list_full,
error => $c->flash('error'),
message => $c->flash('message')
) )
} }

View File

@ -27,7 +27,9 @@ sub subf_view {
cat_title => $cat_title, cat_title => $cat_title,
subf_title => subf_title =>
$c->schema->resultset('Subforums')->title_from_id($subf_id), $c->schema->resultset('Subforums')->title_from_id($subf_id),
thread_list => \@thread_list thread_list => \@thread_list,
error => $c->flash('error'),
message => $c->flash('message')
) )
} }

View File

@ -0,0 +1,6 @@
% if ($error) {
<p style="color: red"><%= $error %></p>
%};
% if ($message) {
<p style="color: blue"><%= $message %></p>
%};

View File

@ -6,6 +6,7 @@
</head> </head>
<body> <body>
%= include 'layouts/default/_header' %= include 'layouts/default/_header'
%= include 'items/_err_msg'
<%= content %> <%= content %>
%= include 'layouts/default/_footer' %= include 'layouts/default/_footer'
</body> </body>

View File

@ -1,11 +1,5 @@
% layout 'default', % layout 'default',
% title => $c->board_name . ' - Login'; % title => $c->board_name . ' - Login';
% if ($error) {
<p style="color: red"><%= $error %></p>
%};
% if ($message) {
<p style="color: blue"><%= $message %></p>
%};
<form method="post" action='/login'> <form method="post" action='/login'>
username: <input username: <input
id="username" id="username"

View File

@ -1,11 +1,5 @@
% layout 'default', % layout 'default',
% title => $c->board_name . ' - Registration'; % title => $c->board_name . ' - Registration';
% if ($error) {
<p style="color: red"><%= $error %></p>
%};
% if ($message) {
<p style="color: blue"><%= $message %></p>
%};
<p>fields marked with <span style="color: red">*</span> are required</p> <p>fields marked with <span style="color: red">*</span> are required</p>
<form method="post" action='/register'> <form method="post" action='/register'>
username: <input username: <input

View File

@ -14,7 +14,8 @@
id="post-content" id="post-content"
name="post-content" name="post-content"
cols="50" rows="5" cols="50" rows="5"
placeholder="post content"></textarea> placeholder="post content"
></textarea>
<br /><br /> <br /><br />
<input type="submit" value="post!" /> <input type="submit" value="post!" />
</form> </form>