forked from extern/django-helpdesk
4ee74e6667
Reformat code to improve readability. Add an include to get an alert when there are errors in a form.
25 lines
995 B
HTML
25 lines
995 B
HTML
{% load i18n bootstrap4form %}
|
|
{% load load_helpdesk_settings %}
|
|
|
|
{% with request|load_helpdesk_settings as helpdesk_settings %}
|
|
{% if helpdesk_settings.HELPDESK_SUBMIT_A_TICKET_PUBLIC %}
|
|
<p>
|
|
{% trans "Unless otherwise stated, all fields are required." %}
|
|
{% trans "Please provide as descriptive a title and description as possible." %}
|
|
</p>
|
|
|
|
{% if form.errors %}
|
|
{% include 'helpdesk/include/alert_form_errors.html' %}
|
|
{% endif %}
|
|
<form role="form" method='post' enctype='multipart/form-data'>
|
|
{% csrf_token %}
|
|
{{ form|bootstrap4form }}
|
|
<button type="submit" class="btn btn-primary btn-lg btn-block">
|
|
{% trans "Submit Ticket" %} <i class="fa fa-paper-plane"></i>
|
|
</button>
|
|
</form>
|
|
{% else %}
|
|
<p>{% trans "Public ticket submission is disabled. Please contact the administrator for assistance." %}</p>
|
|
{% endif %}
|
|
{% endwith %}
|