84 lines
4.4 KiB
HTML
84 lines
4.4 KiB
HTML
|
{% extends "base.html" %}
|
||
|
{% load static %}
|
||
|
{% load has_group %}
|
||
|
|
||
|
{% block content %}
|
||
|
<div class="row justify-content-center">
|
||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-8">
|
||
|
<div class="card">
|
||
|
<div class="card-header">
|
||
|
<h4 class="">{% if note_id %}Edit{% else %}Add{% endif %} notes</h4>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<form
|
||
|
action="{% if note_id %}{% url 'note_update' note_id %}{% else %}{% url 'note_create' %}{% endif %}"
|
||
|
method="post" class="form-horizontal" id="formulaire" name="formulaire">
|
||
|
{% csrf_token %}
|
||
|
{{ form.coach }}
|
||
|
<div class="form-group row ">
|
||
|
<label for="id_date" class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Gymnast
|
||
|
<span class="text-danger"><b>*</b></span></label>
|
||
|
<div
|
||
|
class="col-8 col-md-9 col-lg-6 col-lg-4 col-xl-4 {% if form.jumper.errors %}has-danger{% endif %}">
|
||
|
{{ form.gymnast }}
|
||
|
{{ form.gymnast_related }}
|
||
|
{% if form.gymnast.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.gymnast.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group row ">
|
||
|
<label for="id_date" class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Date <span
|
||
|
class="text-danger"><b>*</b></span></label>
|
||
|
<div
|
||
|
class="col-8 col-sm-6 col-md-4 col-lg-4 col-xl-4 {% if form.date.errors %}has-danger{% endif %}">
|
||
|
{{ form.date }}
|
||
|
{% if form.date.errors %}<span class="btn btn-sm btn-danger-outline">{% for error in form.date.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group row ">
|
||
|
<label for="id_information"
|
||
|
class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Informations <span
|
||
|
class="text-danger"><b>*</b></span></label>
|
||
|
<div
|
||
|
class="col-8 col-sm-10 col-md-10 col-lg-10 col-xl-10 {% if form.id_informations.errors %}has-danger{% endif %}">
|
||
|
{{ form.informations }}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group row ">
|
||
|
<label for="id_status" class="col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label">Status
|
||
|
<span class="text-danger"><b>*</b></span></label>
|
||
|
<div
|
||
|
class="col-8 col-sm-5 col-md-4 col-lg-4 col-xl-4 {% if form.status.errors %}has-danger{% endif %}">
|
||
|
{{ form.status }}
|
||
|
{% if form.status.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.status.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group text-center">
|
||
|
<input type="submit" value="{% if note_id %}Save{% else %}Add{% endif %}"
|
||
|
class="btn btn-warning" />
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block footerscript %}
|
||
|
<script type="text/javascript">
|
||
|
$(function () {
|
||
|
blackDashboard.initDateTimePicker();
|
||
|
});
|
||
|
|
||
|
const csrf_token = "{{ csrf_token|escapejs }}";
|
||
|
const gymnast_lookup = "{% url 'gymnast_lookup' %}";
|
||
|
const skill_lookup = "{% url 'skill_lookup' %}";
|
||
|
</script>
|
||
|
<script src="{% static " js/template_users/datepicker_maxdate_today.js" %}"></script>
|
||
|
{% if request.session.template == 0 %}
|
||
|
<script src="{% static " js/template_users/gymnast_autocomplete_black.js" %}"></script>
|
||
|
<script src="{% static " js/template_users/skill_autocomplete_black.js" %}"></script>
|
||
|
{% else %}
|
||
|
<script src="{% static " js/template_users/gymnast_autocomplete.js" %}"></script>
|
||
|
<script src="{% static " js/template_users/skill_autocomplete.js" %}"></script>
|
||
|
{% endif %}
|
||
|
{% endblock %}
|