]> git.decadent.org.uk Git - memories.git/commitdiff
Take username from logged in user. Fixes #20.
authorSimon Cozens <simon@simon-cozens.org>
Thu, 5 Apr 2007 04:59:00 +0000 (04:59 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Thu, 5 Apr 2007 04:59:00 +0000 (04:59 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@55 041978f6-d955-411f-a9d7-1d8545c9c3c7

templates/photo/comment

index b93902593fdd816d7f2af9767c3b8634605758e3..6b867220d708c5e86bda2e4d41d99ad0f3b5c889 100644 (file)
@@ -48,7 +48,12 @@ function post_comment () {
 [% END %]
     <div class="comment">
         <form action="javascript:post_comment()" method="post">
-        Name: <input id="commentname" name="name" /> <hr>
+        [% IF request.user %]
+        <input id="commentname" name="name" type="hidden" value="[% request.user |html %]"/> 
+        [% ELSE %]
+        Name: <input id="commentname" name="name" /> 
+        <hr>
+        [% END %]
         <textarea id="newcomment" name="content" cols="60" rows="5"/></textarea>
         <p>
         <input type="submit" name="Comment on this picture" value="Comment on this picture">