2022-09-30 10:42:13 +02:00
{% extends "base.html" %}
{% load static %}
{% load has_group %}
{% block content %}
< div class = "row justify-content-center" >
2022-10-03 11:34:40 +02:00
< div class = "col-12 col-sm-12 col-md-12 col-lg-12 col-xl-8" >
2022-09-30 10:42:13 +02:00
< 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_information" class = "col-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 col-form-label" > Informations< / label >
2022-10-03 11:34:40 +02:00
< div class = "col-8 col-sm-10 col-md-10 col-lg-10 col-xl-10 {% if form.id_informations.errors %}has-danger{% endif %}" >
2022-09-30 10:42:13 +02:00
{{ form.informations }}
< / 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 %}