{% extends "gift_registry/base.html" %}

{% block main_content %}
<p><a href="{% url "gift_list" %}"><span style="font-size: 1.3em">⬅</span> Back to Gifts</a></p>


<p>{% if object.image %}
<img src="{{ MEDIA_URL }}{{ object.image }}" alt="" style="float: right; margin: 0 0 1em 1.5em; max-width: 500px; max-height: 500px;" />
{% else %}
<img src="{{ STATIC_URL}}gift_registry/img/gold-present.jpg" alt="" style="float: right; margin: 0 0 1em 1.5em; max-width: 500px;" />
{% endif %}</p>

<h1>{{ object }}</h1>
<p>{{ object.desc }}</p>

{% if object.url %}<p><a href="{{ object.url }}" target="_blank">{{ object.url }}</a></p>{% endif %}

{% if object.bookable %}
<form method="post" action="" style="clear: both;">
{% csrf_token %}
<fieldset>
<h2>Choose this gift</h2>
<p><em>To choose this gift, enter your email address and select "Choose". We'll send you an email to confirm your choice.</em>
{{ giver_form.as_p }}
<p><button type="submit">Choose <span style="font-size: 1.3em">✔</span></button></em></p>
</fieldset>
</form>
{% else %}
<p><strong>Someone has already chosen this gift.</strong></p>
{% endif %}
{% endblock %}
