{% extends "base.html" %} {% block menu %} {% endblock %} {% block content %} TODO {% if training.modalità == "edit" or training.modalità == "add" %}

{% for user in training.crew %} {% if not user.hidden %}
{% endif %} {% endfor %}
$('.chief').on('change', function () { $('input[name="' + this.name + '"]').not(this).prop('checked', false); });

{% for user in training.crew %} {% if not user.hidden %}
{% endif %} {% endfor %}
{% if option('use_location_picker') %}
{% else %}

{% endif %}


{% if training.modalità == "edit" %} {% if option('use_location_picker') %} {% set place = values.place|split('#')[0] %} allertaJS.maps.setMarker(new L.LatLng({{place|split(';')[0]}}, {{place|split(';')[1]}}), true); {% endif %} $.each('{{ values.chief|striptags|e("js") }}'.split(','), function (index, value) { $('.chief-' + value).prop('checked', true); }); $.each('{{ values.crew|striptags|e("js") }}'.split(','), function (index, value) { $('.crew-' + value).prop('checked', true); }); $('#notes').val('{{ values.notes|e("js") }}'); {% endif %} {% endif %} {% if training.modalità == "delete" %}

{{ 'Are you sure you want to delete the training?'|t }}

$('form').submit(function () { return confirm("{{ 'The action cannot be canceled. Are you sure you want to continue?'|t }}"); });
{% endif %} {% block footer %} {% endblock %} {% endblock %}