home · contact · privacy
More refactor, and include previously forgotten decks.tpl.
[guiltcards] / views / card_form.tpl
index c4c64885436ca61db6be939ea5064f53dfc8989e..2454df51506408019a4967366f38f22ec3056f5b 100644 (file)
@@ -1,19 +1,31 @@
-<!DOCTYPE HTML>
-<html>
+% include('_meta_head.tpl')
 <body>
+<h1>Edit {{ card["type"] }} card</h1>
 <form action="{{ web_path }}/decks/{{deck_id}}/cards/{{ card_id }}" method="POST">
-title: <input type="text" name="title" value="{{ title }}" /><br />
-prompt: <input type="text" name="prompt" value="{{ prompt }}" /><br />
-% for answer in answers:
+<input type="hidden" name="type" value="{{ card["type"] }}" /><br />
+% if card["type"] == 'guilt':
+% for answer in card["answers"]:
 answer: <input type="text" name="answer" value="{{ answer }}" /><br />
 % end
-answer: <input type="text" name="answer" /><br />
-answer: <input type="text" name="answer" /><br />
-answer: <input type="text" name="answer" /><br />
+answer: <input type="text" name="answer" value="" /><br />
+answer: <input type="text" name="answer" value="" /><br />
+answer: <input type="text" name="answer" value="" /><br />
+answer: <input type="text" name="answer" value="" /><br />
+% end
+% if card["type"] == 'action':
+title: <input type="text" name="title" value="{{ card["title"] }}" /><br />
+% for paragraph in card["paragraphs"]:
+paragraph: <input type="text" name="paragraph" value="{{ paragraph }}" /><br />
+% end
+paragraph: <input type="text" name="paragraph" value="" /><br />
+paragraph: <input type="text" name="paragraph" value="" /><br />
+paragraph: <input type="text" name="paragraph" value="" /><br />
+paragraph: <input type="text" name="paragraph" value="" /><br />
+% end
 <input type="submit" value="OK" />
 </form>
 <p>
-(leave specific answer fields empty to remove them as answer options)
+(leave specific fields empty to have them not appear on the card)
 </p>
 % if deletable:
 <p>
@@ -22,4 +34,4 @@ Or would you rather <a href="{{ web_path }}/decks/{{deck_id}}/cards/{{ card_id }
 % end
 </form>
 </body>
-</html>
+% include('_meta_foot.tpl')