{% extends mobile_device|yesno:"base.html,base/popup.html" %} {% if mobile_device %} {% block extrahead %} {% load static %} {% endblock %} {% endif %} {% load custom_tags_and_filters %} {% block title %}New training request{% endblock %} {% block content %} {% if not selected_tool %}
{% else %}
{% if form.errors %}
Oops! Something went wrong. Please correct the errors highlighted below.
{{ form.non_field_errors }}
{% endif %}
{% csrf_token %}
{% if user.active_project_count == 1 %} {% else %}
{% if user.active_project_count > 1 %}
{% for project in user.active_projects %}{% if form.project.value|to_int == project.id %}{{ project }}{% endif %}{% endfor %}
{% else %}
You do not have any active projects
{% endif %}
{% if form.project.errors %}
{{ form.project.errors|striptags }}
{% endif %}
{% endif %} {% if training_details.techniques.all %}
{% if form.technique.errors %}
{{ form.technique.errors|striptags }}
{% endif %}
{% endif %} {% if user_availability_allowed %}
{% for time_form in time_forms %}
{% if time_form.start_time.errors %}
{{ time_form.start_time.errors|striptags }}
{% endif %} {% if time_form.end_time.errors %}
{{ time_form.end_time.errors|striptags }}
{% endif %}
{% endfor %}
{% endif %}
{% if form.message.errors %}
{{ form.message.errors|striptags }}
{% endif %}
{% button type="save" submit=False value=form.instance.id|yesno:"Save changes,Create request" onclick="submit_form(this)" %}
{% endif %} {% endblock %}