WIP for rego form, 2
This commit is contained in:
parent
d651776016
commit
74dc779999
6 changed files with 36 additions and 29 deletions
|
@ -1,4 +1,4 @@
|
|||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for category in categories %}
|
||||
{% if not category in exclude %}
|
||||
<li><a href="{% url "product_category" category.id %}">{{ category.name }}</a></li>
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
{% if discounts %}
|
||||
<div class="panel-success">
|
||||
<h3 class="panel-heading">Discounts and Complimentary Items</h3>
|
||||
<div class="panel-body">
|
||||
<blockquote>
|
||||
<p>The following discounts and complimentary items are available to you. If you wish to take advantage of this offer, you must choose your items below. This discounts will be applied automatically when you check out.</p>
|
||||
{% regroup discounts by discount.description as discounts_grouped %}
|
||||
{% for discount_type in discounts_grouped %}
|
||||
<h4>{{ discount_type.grouper }}</h4>
|
||||
<ul>
|
||||
{% for discount in discount_type.list %}
|
||||
<li>{{ discount.quantity }} × {{ discount.clause }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</blockquote>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="my-4">
|
||||
<h2>Discounts and Complimentary Items</h2>
|
||||
<p>The following discounts and complimentary items are available to you. If you wish to take advantage of this offer, you must choose your items below. This discounts will be applied automatically when you check out.</p>
|
||||
{% regroup discounts by discount.description as discounts_grouped %}
|
||||
{% for discount_type in discounts_grouped %}
|
||||
<h3>{{ discount_type.grouper }}</h3>
|
||||
<ul>
|
||||
{% for discount in discount_type.list %}
|
||||
<li>{{ discount.quantity }} × {{ discount.clause }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block proposals_body %}
|
||||
|
||||
<div class="btn-group">
|
||||
<button id="voucher-form-button" class="btn btn-info" onclick="showVoucherForm()">Enter voucher code</button>
|
||||
<button id="voucher-form-button" class="btn" onclick="showVoucherForm()">Enter voucher code</button>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" method="post" action="">
|
||||
<form class="form-horizontal my-4" method="post" action="">
|
||||
{% csrf_token %}
|
||||
|
||||
<fieldset id="voucher-form" style="display: none;">
|
||||
|
@ -46,16 +46,15 @@
|
|||
{% endif %}
|
||||
|
||||
|
||||
<h2>{{ category.name }}</h2>
|
||||
<h1>{{ category.name }}</h1>
|
||||
<blockquote>{{ category.description|safe }}</blockquote>
|
||||
|
||||
<fieldset>
|
||||
|
||||
{% if discounts %}
|
||||
{% include "registrasion/discount_list.html" with discounts=discounts %}
|
||||
{% endif %}
|
||||
|
||||
<h3>Make a selection</h3>
|
||||
<h2>Make a selection</h2>
|
||||
{% include "_form_snippet.html" with form=form %}
|
||||
|
||||
<br />
|
||||
|
|
|
@ -47,18 +47,15 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-4">
|
||||
<div class="my-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">
|
||||
{% missing_categories as missing %}
|
||||
<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>
|
||||
|
|
12
pinaxcon/templatetags/lca2019_tags.py
Normal file
12
pinaxcon/templatetags/lca2019_tags.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from django import template
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.filter
|
||||
def has_required_fields(form):
|
||||
for field in form:
|
||||
if field.field.required:
|
||||
return True
|
||||
return False
|
|
@ -250,6 +250,10 @@ main.container-fluid {
|
|||
border: 1px $primary solid;
|
||||
color: $primary;
|
||||
padding: 5rem 6rem ;
|
||||
|
||||
.text-info {
|
||||
color: $primary !important;
|
||||
}
|
||||
}
|
||||
|
||||
.col-form-label, .form-check-label {
|
||||
|
|
Loading…
Reference in a new issue