Explorar el Código

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

Frederic G. MARAND hace 8 años
padre
commit
437e238870
Se han modificado 1 ficheros con 5 adiciones y 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>