Explorar o código

Commit 9.5: Only show add task form if logged in.

Frederic G. MARAND %!s(int64=8) %!d(string=hai) anos
pai
achega
437e238870
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      simple-todos.html

+ 5 - 3
simple-todos.html

@@ -17,9 +17,11 @@
     {{> loginButtons}}
 
     <!-- add a form below the h1 -->
-    <form class="new-task">
-      <input type="text" name="text" placeholder="Type to add new tasks" />
-    </form>
+    {{#if currentUser}}
+      <form class="new-task">
+        <input type="text" name="text" placeholder="Type to add new tasks" />
+      </form>
+    {{/if}}
   </header>
 
   <ul>