51 lines
1.2 KiB
HTML
51 lines
1.2 KiB
HTML
{% extends "chrono/manager_agenda_view.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
{{ form.media }}
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
{% if object.id %}
|
|
<a href="#">{{object}}</a>
|
|
{% else %}
|
|
<a href="#">{% trans "New time period exception" %}</a>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
{% if object.id %}
|
|
<h2>{% trans "Edit time period exception" %}</h2>
|
|
<span class="actions">
|
|
<a rel="popup" href="{% url 'chrono-manager-time-period-exception-delete' pk=object.id %}">{% trans 'Delete' %}</a>
|
|
</span>
|
|
{% else %}
|
|
<h2>{% trans "New time period exception" %}</h2>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{{ form.as_p }}
|
|
<div class="buttons">
|
|
<button class="submit-button">{% trans "Save" %}</button>
|
|
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=desk.agenda.id %}">{% trans 'Cancel' %}</a>
|
|
</div>
|
|
|
|
{% if not object.id %}
|
|
<script>
|
|
$('[name="start_datetime$date"]').on('change', function() {
|
|
var $end_datetime = $('[name="end_datetime$date"]');
|
|
if (! $end_datetime.val()) {
|
|
$end_datetime.val($(this).val());
|
|
}
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
</form>
|
|
{% endblock %}
|