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);
gap: 3rem;
}
.wholesale-field {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.5rem;
}

View File

@ -27,7 +27,7 @@
</div>
<div>
<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>
</section>
{% endif %}

View File

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