Browse Source

+ /comments/new

master
Alex 'AdUser' Z 8 years ago
parent
commit
2e2d561473
  1. 1
      lib/LDV.pm
  2. 8
      templates/comments/new.html.ep

1
lib/LDV.pm

@ -41,6 +41,7 @@ sub startup {
my $comm = $r->route('/comments') -> to(controller => 'comments');
$comm->post('/add') ->to(action => 'add');
$comm->get ('/get') ->to(action => 'get');
$comm->get ('/new') ->to(action => 'new');
mkdir $self->app->home->rel_dir('data/comments');
}

8
templates/comments/new.html.ep

@ -0,0 +1,8 @@
% my $pageid = stash('pageid') || '';
<form method="POST" action="/comments/add" id="cadd">
<hr/>
<textarea></textarea>
<br/>
<input type="submit" value="<%= l('Add') %>">
<input type="hidden" value="<%= $pageid %>" name="pageid">
</form>
Loading…
Cancel
Save