Changeset - 74dc779999c4
[Not reviewed]
0 5 1
Tobias - 6 years ago 2018-09-29 05:14:21
tobias@localhost.localdomain
WIP for rego form, 2
6 files changed with 36 insertions and 29 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/registrasion/_category_list.html
Show inline comments
 
<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>
pinaxcon/templates/registrasion/discount_list.html
Show inline comments
 
{% 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 }} &times; {{ 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 }} &times; {{ discount.clause }}</li>
 
    {% endfor %}
 
  </ul>
 
  {% endfor %}
 
</div>
 

	
 
{% endif %}
pinaxcon/templates/registrasion/product_category.html
Show inline comments
...
 
@@ -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 />
pinaxcon/templates/registrasion/review.html
Show inline comments
...
 
@@ -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>
pinaxcon/templatetags/lca2019_tags.py
Show inline comments
 
new file 100644
 
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
static/src/scss/app.scss
Show inline comments
...
 
@@ -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 {
0 comments (0 inline, 0 general)