Push error flash code into _err_msg.html.ep
This commit is contained in:
parent
f0073d1f1f
commit
75ca0aba0f
|
@ -19,7 +19,9 @@ sub index {
|
|||
|
||||
$c->render(
|
||||
template => 'index',
|
||||
category_tree => $c->model('forums')->list_full
|
||||
category_tree => $c->model('forums')->list_full,
|
||||
error => $c->flash('error'),
|
||||
message => $c->flash('message')
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ sub subf_view {
|
|||
cat_title => $cat_title,
|
||||
subf_title =>
|
||||
$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')
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
% if ($error) {
|
||||
<p style="color: red"><%= $error %></p>
|
||||
%};
|
||||
% if ($message) {
|
||||
<p style="color: blue"><%= $message %></p>
|
||||
%};
|
|
@ -6,6 +6,7 @@
|
|||
</head>
|
||||
<body>
|
||||
%= include 'layouts/default/_header'
|
||||
%= include 'items/_err_msg'
|
||||
<%= content %>
|
||||
%= include 'layouts/default/_footer'
|
||||
</body>
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
% layout 'default',
|
||||
% 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'>
|
||||
username: <input
|
||||
id="username"
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
% layout 'default',
|
||||
% 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>
|
||||
<form method="post" action='/register'>
|
||||
username: <input
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
id="post-content"
|
||||
name="post-content"
|
||||
cols="50" rows="5"
|
||||
placeholder="post content"></textarea>
|
||||
placeholder="post content"
|
||||
></textarea>
|
||||
<br /><br />
|
||||
<input type="submit" value="post!" />
|
||||
</form>
|
Loading…
Reference in New Issue