Further template tweaks

This commit is contained in:
Tobias 2018-09-29 15:50:42 +12:00
parent 123de1a15d
commit 8bffe45d54
6 changed files with 69 additions and 69 deletions

View file

@ -9,7 +9,7 @@
Enquiries: please e-mail <a href="mailto:contact@lca2019.org">contact@lca2019.org</a>
</p>
<ul>
<ul class="list-unstyled">
<li><strong>Invoice number:</strong> {{ invoice.id }}
<li><strong>Invoice status:</strong> {{ invoice.get_status_display }}</li>
<li><strong>Issue date:</strong> {{ invoice.issue_time|date:"DATE_FORMAT" }}

View file

@ -1,7 +1,7 @@
{% extends "registrasion/base.html" %}
{% load registrasion_tags %}
{% block body %}
{% block proposals_body %}
<h1>Oh No!</h1>
@ -17,8 +17,8 @@
or you can return to the dashboard and try to fix it yourself.</p>
<div class="form-actions">
<a class="btn btn-default" href="{% url "checkout" %}?fix_errors=true">Try fixing these errors</a>
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
<a class="btn btn-light" href="{% url "checkout" %}?fix_errors=true">Try fixing these errors</a>
<a class="btn btn-light" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% endblock %}

View file

@ -9,31 +9,15 @@
{{ voucher_form.media.js }}
{{ form.media.js }}
<script type="text/javascript">
function showVoucherForm() {
$("#voucher-form").show();
$("#voucher-form-button").hide();
}
</script>
{% endblock %}
{% block proposals_body %}
<div class="btn-group">
<button id="voucher-form-button" class="btn" onclick="showVoucherForm()">Enter voucher code</button>
</div>
<form class="form-horizontal my-4" method="post" action="">
{% csrf_token %}
<fieldset id="voucher-form" style="display: none;">
{% include "_form_snippet.html" with form=voucher_form %}
<div class="btn-group" />
<input class="btn btn-primary" type="submit" value="Add voucher" />
</div>
</fieldset>
<div class="vertical-bigger"></div>

View file

@ -12,43 +12,33 @@
{% block scripts_extra %}
{{ voucher_form.media.js }}
{{ form.media.js }}
<script type="text/javascript">
function showVoucherForm() {
$("#voucher-form").show();
$("#voucher-form-button").hide();
}
</script>
{% endblock %}
{% block proposals_body %}
<a id="voucher-form-button" class="btn btn-info" href="{% url "voucher_code" %}">Enter voucher code</a>
<h1 class="mb-4">Order Review</h1>
{% items_pending as pending %}
{% if pending %}
<h3>Current selection</h3>
<p>You've selected the following items, which will be in your invoice when
you check out:<p>
{% include "registrasion/_items_list.html" with items=pending %}
<div class="my-4">
<h2>Current selection</h2>
<p>You've selected the following items, which will be in your invoice when
you check out:<p>
{% include "registrasion/_items_list.html" with items=pending %}
</div>
{% endif %}
{% items_purchased as purchased %}
{% if purchased %}
<div class="my-4">
<h3>Previously purchased</h3>
<h2>Previously purchased</h2>
<p>You've already paid for the following items:</p>
{% include "registrasion/_items_list.html" with items=purchased suffix="<em>(PAID)</em>" %}
</div>
{% endif %}
<div class="my-4">
<h3>Modify your selection</h3>
<h2>Modify your selection</h2>
<p>
{% missing_categories as missing %}
{% if missing %}
@ -60,37 +50,44 @@
{% include "registrasion/_category_list.html" with categories=missing %}
{% endif %}
</p>
<p>
<strong>You can also change your selection from these categories:</strong>
{% available_categories as available %}
{% include "registrasion/_category_list.html" with categories=available exclude=missing %}
</p>
</div>
<p>
<strong>You can also change your selection from these categories:</strong>
</p>
<div class="my-4">
<h2>Voucher</h2>
<p>If you have been given a voucher, please <a id="voucher-form-button" href="{% url "voucher_code" %}">enter your voucher code</a> now.
</p>
</div>
{% available_categories as available %}
{% include "registrasion/_category_list.html" with categories=available exclude=missing %}
<h3>What next?</h3>
<div class="my-4">
<h2>What next?</h2>
{% if pending %}
<p>You can either check out an invoice and pay for your selections, or return to
the dashboard.</p>
{% if pending %}
<p>You can either check out an invoice and pay for your selections, or return to
the dashboard.</p>
<div class="btn-group">
<a class="btn btn-success" href="{% url "checkout" %}">
<i class="fa fa-credit-card"></i> Check out and pay
</a>
<a class="btn btn-primary" href="{% url "dashboard" %}">Return to dashboard</a>
{% else %}
<p>You have no items that need to be paid.</p>
<div class="form-actions">
<a class="btn btn-primary" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% endif %}
</div>
{% else %}
<p>You have no items that need to be paid.</p>
<div class="form-actions">
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,20 @@
{% extends "registrasion/base.html" %}
{% load crispy_forms_tags %}
{% block proposals_body %}
<form method="post" action="">
{% csrf_token %}
<div class="panel panel-primary">
<div class="panel-body">
{{ voucher_form|crispy}}
</div>
<div class="panel-footer">
<input class="btn btn-primary" type="submit" value="Apply voucher code" />
<a href="{% url "dashboard" %}" class="btn btn-default">Back to dashboard</a>
</div>
</div>
</form>
{% endblock %}

View file

@ -47,18 +47,17 @@
{% block navbar %}{% include 'nav.html' %}{% endblock %}
</header>
{% if messages %}
<div class="container my-5 alert alert-light bg-primary text-secondary">
<ul class="messagelist hidden-print list-unstyled">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<main role="main" class="{% block main_class %}container{% endblock %}">
{% if messages %}
<div class="container mb-5 alert alert-light border-primary">
<ul class="messagelist hidden-print">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<h1 class="text-primary text-upper h2 mb-5">{% block page_title %}{% endblock %}</h1>
{% block body_base %}