home · contact · privacy
Refactor.
[guiltcards] / views / card_form.tpl
index 106c35f7f626b8499912bf70c11239ccf59bd9e1..9e1e68763b407efe64d6a8d0e517ebe72c95c142 100644 (file)
@@ -1,10 +1,11 @@
 <!DOCTYPE HTML>
 <html>
 <body>
+<h1>Edit {{ card["type"] }} card</h1>
 <form action="{{ web_path }}/decks/{{deck_id}}/cards/{{ card_id }}" method="POST">
-<input type="hidden" name="type" value="{{ card_type }}" /><br />
-% if card_type == 'guilt':
-% 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" value="" /><br />
@@ -12,9 +13,9 @@ 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="{{ title }}" /><br />
-% for paragraph in paragraphs:
+% 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 />