Update form

This commit is contained in:
Nathan Chapman 2023-08-01 22:21:16 -06:00
parent f5ae448c98
commit 10cd9cf0c5
3 changed files with 27 additions and 18 deletions

View File

@ -1141,3 +1141,8 @@ footer > section {
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 3rem; gap: 3rem;
} }
.wholesale-field {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.5rem;
}

View File

@ -27,7 +27,7 @@
</div> </div>
<div> <div>
<h4>I'm already a wholesale customer</h4> <h4>I'm already a wholesale customer</h4>
<p>If you are already a wholesale customer, please <a href="{% url 'account_login' %}?next=/wholesale-orders/new/">login</a> and return to this page to place an order.<p> <p>If you are already a wholesale customer, please <a href="{% url 'login' %}?next=/wholesale-orders/new/">login</a> and return to this page to place an order.<p>
</div> </div>
</section> </section>
{% endif %} {% endif %}

View File

@ -8,23 +8,27 @@
<section> <section>
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
<table class="form-table"> <div class="wholesale-fields">
<thead> <div class="wholesale-field">
<th>Product</th> <strong>Product</strong>
<th>16 oz Qty&emsp;/&emsp;5 lb Qty</th> <strong>16 oz.</strong>
</thead> <strong>5 lb.</strong>
<tbody> <span></span>
{{ form.as_table }} </div>
</tbody> {% for field in form %}
<tfoot> <div class="wholesale-field">
<tr> {{ field.label_tag }}
<td></td> {{ field }}
<td> <div>
<button type="submit">Place order</button> {{ field.errors }}
</td> {% if field.help_text %}
</tr> <p class="help">{{ field.help_text|safe }}</p>
</tfoot> {% endif %}
</table> </div>
</div>
{% endfor %}
</div>
<button type="submit">Place order</button>
</form> </form>
</section> </section>
</article> </article>