Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (56 sloc) 2.32 KB
{% extends "site_base.html" %}
{% load xhrlinks %}
{% load i18n lazysignup_tags %}
{% load cache %}
{% block content_class %}importer{% endblock %}
{% block content %}
<h1>Import a Deck</h1>
{% if request.method == "POST" %}
Created {{ cards_created }} cards. <a href="{{ deck.get_absolute_url }}">View the new deck</a>.
{% else %}
<form method="POST">
{% csrf_token %}
<p>
Paste a tab-separated list of cards: Japanese expression, reading, and meaning.
</p>
<p>
<label for="deck_name">Deck name:</label><br>
<input id="deck_name" type="text" name="deck_name" value="{{ deck_name|default:"" }}">
</p>
<p>
<input type="checkbox" name="recognition" id="recognition" checked="checked">
<label for="recognition">Recognition</label>
<input type="checkbox" name="production" id="production">
<label for="production">Production</label>
<input type="checkbox" name="kanji_reading" id="kanji_reading">
<label for="kanji_reading">Kanji Reading</label>
<input type="checkbox" name="kanji_writing" id="kanji_writing">
<label for="kanji_writing">Kanji Writing</label>
</p>
<div>
<label for="col0">First:</label>
<select name="col0" id="col0">
<option name="expression" value="expression" selected="true">Expression</option>
<option name="reading" value="reading">Reading</option>
<option name="meaning" value="meaning">Meaning</option>
</select>
<label for="col0">Second:</label>
<select name="col1" id="col1">
<option name="expression" value="expression">Expression</option>
<option name="reading" value="reading" selected="true">Reading</option>
<option name="meaning" value="meaning">Meaning</option>
</select>
<label for="col0">Third:</label>
<select name="col2" id="col2">
<option name="expression" value="expression">Expression</option>
<option name="reading" value="reading">Reading</option>
<option name="meaning" value="reading" selected="true">Meaning</option>
</select>
</div>
<p>
<textarea id="facts" name="facts" class="full_width" style="height:40em"></textarea>
</p>
<input type="submit" value="Submit">
</form>
{% endif %}
{% endblock %}
Something went wrong with that request. Please try again.