regluit/frontend/templates/kindle_config.html

69 lines
2.8 KiB
HTML
Raw Normal View History

2013-05-31 19:19:58 +00:00
{% extends "email_change/base.html" %}
{% block title %}Add or change your Kindle email{% endblock %}
{% block extra_js %}
{{ block.super }}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function() {
var kindle_ebook_id = {{ kindle_ebook_id }};
if(kindle_ebook_id) {
$j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) {
$j('#replace_me').html(data);
return false;
});
}
});
</script>
{% endblock %}
2013-05-31 19:19:58 +00:00
{% block ce_content %}
{% with request.user.profile.kindle_email as kindle_email %}
<h2>Add or change your Kindle email</h2>
<div id="content-main">
{% if kindle_email %}
{% if kindle_ebook_id %}
<p>
Welcome back, {{ user.username }}! We're sending <I>{{ title }}</I> to {{ kindle_email }}.
</p>
<span id="replace_me"><img src="{{ STATIC_URL }}images/loading.gif"></span>
<p>
(If you'd like to change your Kindle email, you can do so below. You'll need to download the book again.)
</p>
{% else %}
<p>You already have a Kindle email on file with Unglue.it: {{ kindle_email }} .</p>
<p>You can change it below.</p>
{% endif %}
2013-05-31 19:19:58 +00:00
{% else %}
<p>Enter your Kindle email address below:</p>
{% endif %}
{% if kindle_ebook_id %}
<form method="post" action="{% url kindle_config_download kindle_ebook_id %}">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% if kindle_email %}Change{% else %}Add{% endif %}" />
</form>
{% else %}
<form method="post" action="{% url kindle_config %}">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% if kindle_email %}Change{% else %}Add{% endif %}" />
</form>
{% endif %}
2013-05-31 19:19:58 +00:00
<script type="text/javascript">
document.getElementById('id_kindle_email').focus()
</script>
</div>
<div>
<p>Don't know the email address for your device or reading app? <a href="http://www.amazon.com/myk#manageDevices">Find it here</a>, under Manage Your Devices.</p>
{% if not kindle_email %}
<p>Before your device or app can receive emails from Unglue.it, you'll have to add <b>kindle@gluejar.com</b> to your <a href="http://www.amazon.com/myk#pdocSettings">Approved Personal Document Email List</a> under Personal Document Settings.</p>
{% endif %}
<p>Once we have your Kindle email, you'll be able to send unglued ebooks to your Kindle device or app with one click from any Unglue.it download page.</p>
</div>
{% endwith %}
{% endblock %}