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

View file

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

View file

@ -25,38 +25,35 @@
{% 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 %}
{% for section in sections %}
<h2>{{ section.title }}</h2>
<h2>{{ section.title }}</h2>
{% if section.description %}
<blockquote>{{ section.description|safe }}</blockquote>
{% endif %}
<fieldset>
{% if section.description %}
<blockquote>{{ section.description|safe }}</blockquote>
{% endif %}
<fieldset>
{% if section.discounts %}
{% include "registrasion/discount_list.html" with discounts=section.discounts %}
{% endif %}
<h3>Available options</h3>
{% include "_form_snippet.html" with form=section.form %}
<br />
</fieldset>
{% endfor %}
<br />
{% endfor %}
<div class="btn-group">
{% if current_step > 1 %}
<a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a>
{% endif %}
<input class="btn btn-success" type="submit" value="Next Step" />
</div>
<div class="btn-group">
{% if current_step > 1 %}
<a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a>
{% endif %}
<input class="btn btn-primary" type="submit" value="Next Step" />
</div>
</form>

View file

@ -24,7 +24,7 @@
{% endblock %}
{% block content %}
{% block proposals_body %}
<a id="voucher-form-button" class="btn btn-info" href="{% url "voucher_code" %}">Enter voucher code</a>
{% items_pending as pending %}
@ -37,32 +37,39 @@
{% include "registrasion/_items_list.html" with items=pending %}
{% endif %}
<h3>Previously purchased</h3>
{% items_purchased as purchased %}
{% if purchased %}
<div class="mb-4">
<h3>Previously purchased</h3>
<p>You've already paid for the following items:</p>
{% include "registrasion/_items_list.html" with items=purchased suffix="<em>(PAID)</em>" %}
{% endif %}
<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>
{% missing_categories as missing %}
{% if missing %}
<div class="alert-warning">
<p class="label-warning">
<strong>You have <em>not</em> selected anything from the following
categories. If your ticket includes any of these, you still need to
make a selection:
</strong>
</p>
{% include "registrasion/_category_list.html" with categories=missing %}
</div>
{% endif %}
<div class="mb-4">
<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>
{% missing_categories as missing %}
{% if missing %}
<div class="alert-warning">
<p class="label-warning">
<strong>You have <em>not</em> selected anything from the following
categories. If your ticket includes any of these, you still need to
make a selection:
</strong>
</p>
{% include "registrasion/_category_list.html" with categories=missing %}
</div>
{% endif %}
</div>
<p>
<strong>You can also change your selection from these categories:</strong>
</p>

View file

@ -7,20 +7,30 @@
{% load staticfiles %}
{% if user.is_staff %}
<div class="container">
<h2>Administration</h2>
<div class="page-row">
<div class="col-xs-12">
<a class="btn btn-lg btn-info" role="button" href="{% url "reports_list" %}">Reports</a>
<div class="container mb-5">
<div class="row">
<div class="col-12 text-primary">
<h2>{% trans "Administration" %}</h2>
<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>
{% endif %}
<div class="container">
<div class="col-12">
<h2>{% trans "Attend" %} {% conference_name %}</h2>
<div class="container mb-5">
<div class="row">
<div class="col-12 text-primary">
<h2>{% trans "Attend" %} {% conference_name %}</h2>
</div>
</div>
</div>
<div class="container">
<div class="page-row">
{% if not user.attendee.completed_registration %}
<div class="panel panel-default">
@ -56,7 +66,7 @@
</div>
</div>
</div>
{% items_pending as pending %}
<div class="col-xs-12 col-sm-12 col-lg-12">
<div class="panel panel-default">
@ -64,7 +74,7 @@
<h4>Account</h4>
</div>
<div class="panel-body">
{% if pending %}
<div class="col-xs-12 col-sm-6 col-lg-6">
<div class="panel panel-warning">
@ -80,7 +90,7 @@
</div>
</div>
{% endif %}
{% items_purchased as purchased %}
{% if purchased %}
<div class="col-xs-12 col-sm-6 col-lg-6">
@ -104,7 +114,7 @@
</div>
</div>
</div>
{% invoices as invoices %}
{% if invoices %}
<div class="col-xs-12 col-sm-12 col-lg-12">
@ -130,7 +140,7 @@
</div>
</div>
{% endif %}
{% available_credit as credit %}
{% if credit %}
<div class="col-xs-12 col-sm-12 col-lg-12">
@ -144,11 +154,11 @@
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>