aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-09 11:33:13 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-09 11:33:13 +0200
commitcea9e421a811454fb11fc22443aac2f840bb2163 (patch)
tree3bcdedea662c5b8b49e7a8e9575dcbb3050116b5
parentadded new method for retrieving right project (diff)
downloadDivid-cea9e421a811454fb11fc22443aac2f840bb2163.tar.gz
added project id to post and a commenct
-rw-r--r--views/projectPost.ejs9
1 files changed, 5 insertions, 4 deletions
diff --git a/views/projectPost.ejs b/views/projectPost.ejs
index 5e7af87..2f63fc5 100644
--- a/views/projectPost.ejs
+++ b/views/projectPost.ejs
@@ -11,6 +11,7 @@
<form class="form-horizontal" method="post">
+ <input type="hidden" name="project" value="<%= project._id %>">
<fieldset>
<h1><legend><%= title %></legend></h1>
@@ -35,10 +36,10 @@
</div>
</div>
<%
- var d = new Date();
- var n = d.getFullYear() + '-' + ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2);
- var t = d.toLocaleTimeString().slice(0, 5);
-
+ // we need to populate the date- and timefield with the current time and date
+ var d = new Date();
+ var n = d.getFullYear() + '-' + ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2);
+ var t = d.toLocaleTimeString().slice(0, 5);
%>
<!-- <%= d %> -->
<div class="control-group">