WIP for rego form

This commit is contained in:
Tobias 2018-09-29 13:11:20 +12:00
parent 7977403957
commit d651776016
5 changed files with 82 additions and 58 deletions

View file

@ -1,4 +1,5 @@
{% load lca2018_tags %} {% load lca2018_tags %}
{% load lca2019_tags %}
{% load bootstrap %} {% load bootstrap %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
@ -9,8 +10,10 @@
<br/> <br/>
{% endif %} {% endif %}
{% if form|has_required_fields %}
<blockquote> <blockquote>
Fields marked with a<br/>* are required Fields marked with a * are required
</blockquote> </blockquote>
{% endif %}
{% crispy form %} {{ form|crispy }}

View file

@ -1,2 +1,9 @@
{% extends "content_page.html" %} {% extends "utility_page.html" %}
{% load staticfiles %} {% load staticfiles %}
{% block utility_body %}
{% block proposals_body %}
{% endblock %}
{% endblock %}

View file

@ -25,9 +25,9 @@
{% endblock %} {% endblock %}
{% block content %} {% block proposals_body %}
<form class="form-horizontal" method="post" action=""> <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{% for section in sections %} {% for section in sections %}
@ -38,24 +38,21 @@
{% endif %} {% endif %}
<fieldset> <fieldset>
{% if section.discounts %} {% if section.discounts %}
{% include "registrasion/discount_list.html" with discounts=section.discounts %} {% include "registrasion/discount_list.html" with discounts=section.discounts %}
{% endif %} {% endif %}
<h3>Available options</h3>
{% include "_form_snippet.html" with form=section.form %} {% include "_form_snippet.html" with form=section.form %}
</fieldset>
<br /> <br />
</fieldset>
{% endfor %} {% endfor %}
<div class="btn-group"> <div class="btn-group">
{% if current_step > 1 %} {% if current_step > 1 %}
<a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a> <a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a>
{% endif %} {% endif %}
<input class="btn btn-success" type="submit" value="Next Step" /> <input class="btn btn-primary" type="submit" value="Next Step" />
</div> </div>
</form> </form>

View file

@ -24,7 +24,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block proposals_body %}
<a id="voucher-form-button" class="btn btn-info" href="{% url "voucher_code" %}">Enter voucher code</a> <a id="voucher-form-button" class="btn btn-info" href="{% url "voucher_code" %}">Enter voucher code</a>
{% items_pending as pending %} {% items_pending as pending %}
@ -37,18 +37,19 @@
{% include "registrasion/_items_list.html" with items=pending %} {% include "registrasion/_items_list.html" with items=pending %}
{% endif %} {% endif %}
<h3>Previously purchased</h3>
{% items_purchased as purchased %} {% items_purchased as purchased %}
{% if purchased %} {% if purchased %}
<div class="mb-4">
<h3>Previously purchased</h3>
<p>You've already paid for the following items:</p> <p>You've already paid for the following items:</p>
{% include "registrasion/_items_list.html" with items=purchased suffix="<em>(PAID)</em>" %} {% include "registrasion/_items_list.html" with items=purchased suffix="<em>(PAID)</em>" %}
</div>
{% endif %} {% endif %}
<div class="mb-4">
<h3>Add to your selection</h3> <h3>Add to your selection</h3>
<p>You can add these items now, or you can come back and add them in a later purchase.</p>
<p>You can add these items now, or you can come back and add them in a
later purchase.</p>
{% missing_categories as missing %} {% missing_categories as missing %}
{% if missing %} {% if missing %}
<div class="alert-warning"> <div class="alert-warning">
@ -62,6 +63,12 @@
{% include "registrasion/_category_list.html" with categories=missing %} {% include "registrasion/_category_list.html" with categories=missing %}
</div> </div>
{% endif %} {% endif %}
</div>
<p> <p>
<strong>You can also change your selection from these categories:</strong> <strong>You can also change your selection from these categories:</strong>

View file

@ -7,20 +7,30 @@
{% load staticfiles %} {% load staticfiles %}
{% if user.is_staff %} {% if user.is_staff %}
<div class="container"> <div class="container mb-5">
<h2>Administration</h2> <div class="row">
<div class="page-row"> <div class="col-12 text-primary">
<div class="col-xs-12"> <h2>{% trans "Administration" %}</h2>
<a class="btn btn-lg btn-info" role="button" href="{% url "reports_list" %}">Reports</a> <p>The following administrative tools are available to you:
<ul class="list-unstyled">
<li><a href="{% url "reports_list" %}">Reports</a></li>
</ul>
</p>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
<div class="container"> <div class="container mb-5">
<div class="col-12"> <div class="row">
<div class="col-12 text-primary">
<h2>{% trans "Attend" %} {% conference_name %}</h2> <h2>{% trans "Attend" %} {% conference_name %}</h2>
</div> </div>
</div>
</div>
<div class="container">
<div class="page-row"> <div class="page-row">
{% if not user.attendee.completed_registration %} {% if not user.attendee.completed_registration %}
<div class="panel panel-default"> <div class="panel panel-default">