Update playdoh template for deferred award claim

This commit is contained in:
Les Orchard 2012-04-14 17:29:21 -04:00
Родитель d746529a11
Коммит bc28d2a860
1 изменённых файлов: 44 добавлений и 4 удалений

Просмотреть файл

@ -7,15 +7,55 @@
<section class="row-fluid">
<section class="span3">
<header class="page-header">
<h2>{{ _("Claim an award") }}</h2>
<h2>{{ _("Award Claim") }}</h2>
</header>
<form id="claim_award" method="POST" action="">
<dl class="details">
{% if deferred_award.email %}
<dt>Email address:</dt>
<dd><code class="email">{{ deferred_award.email }}</code></dd>
{% endif %}
<dt>Claim code:</dt>
<dd><code>{{ deferred_award.claim_code }}</code></dd>
</dl>
{% if deferred_award.allows_grant_by(request.user) %}
<form id="grant_award" method="POST" action="">
<input type="hidden" name="is_grant" value="1" />
{{ csrf() }}
<h3>{{ _("Grant") }}</h3>
<p>{{ _("You can grant this award to someone else") }}
{{ grant_form.as_p() }}
<input type="submit" class="submit" value="{{ _("Grant this award") }}">
</form>
{% endif %}
{% set email_mismatch = (deferred_award.email and request.user.email != deferred_award.email) %}
<form id="claim_award" method="POST" action="" class="{{ email_mismatch and 'email-mismatch ' or '' }}">
<input type="hidden" name="is_grant" value="0" />
{{ csrf() }}
<p>{{ _("If you're reading this, then you can claim an award for this badge!") }}</p>
<input type="submit" class="submit" value="{{ _("Claim your award") }}">
<h3>{{ _("Claim") }}</h3>
{% if email_mismatch %}
{# This isn't enforced, since an awardee might have multiple email addresses #}
{% trans %}
<p><span class="label label-warning">Note:</span>
<em>This award may not be intended for you.</em>
Your email address does not match this award claim.
</p>
{% endtrans %}
{% else %}
<p>{{ _("You can claim this award for yourself") }}</p>
{% endif %}
<input type="submit" class="submit" value="{{ _("Claim this award") }}">
</form>
<div>
{% set self_url = request.build_absolute_uri(deferred_award.get_claim_url()) %}
{{ qr_code_image(self_url, alt="Scan to claim!", size="200") }}
</div>
</section>
<section class="span9" id="detail">