refactor(orders): clean up order form structure and improve script loading
This commit is contained in:
@@ -164,7 +164,14 @@
|
||||
data-ajax-url="{% url 'customers:api-search-customers' %}"
|
||||
data-create-url="{% url 'customers:api-create-customer' %}"
|
||||
data-modal-id="createCustomerModal">
|
||||
{{ form.customer.value|default:'' }}
|
||||
{% if form.customer.value %}
|
||||
<option value="{{ form.customer.value }}" selected
|
||||
data-name="{{ form.instance.customer.name }}"
|
||||
data-phone="{{ form.instance.customer.phone|default:'' }}"
|
||||
data-email="{{ form.instance.customer.email|default:'' }}">
|
||||
{{ form.instance.customer.name }}{% if form.instance.customer.phone %} ({{ form.instance.customer.phone }}){% endif %}
|
||||
</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
{% endif %}
|
||||
{% if form.customer.errors %}
|
||||
|
||||
Reference in New Issue
Block a user