django-helpdesk/helpdesk/templates/helpdesk/public_create_ticket_base.html
bbe 4ee74e6667 Better public create ticket form with the initialization of the datepicker for due date as a media.
Reformat code to improve readability.
Add an include to get an alert when there are errors in a form.
2020-10-23 16:23:47 +02:00

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 %}