52 lines
1.3 KiB
HTML
52 lines
1.3 KiB
HTML
{% extends "chrono/manager_agenda_view.html" %}
|
|
{% load i18n gadjo %}
|
|
|
|
{% 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" %}</a>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
{% if object.id %}
|
|
<h2>{% trans "Edit Time Period" %}</h2>
|
|
<span class="actions">
|
|
<a rel="popup" href="{% url 'chrono-manager-time-period-delete' pk=object.id %}">{% trans 'Delete' %}</a>
|
|
</span>
|
|
{% else %}
|
|
<h2>{% trans "New Time Period" %}</h2>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{{ form|with_template }}
|
|
<div class="buttons">
|
|
<button class="submit-button">{% trans "Save" %}</button>
|
|
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
|
|
</div>
|
|
|
|
<script>
|
|
$('input[type=radio][name=repeat]').change(function() {
|
|
if(!this.checked)
|
|
return;
|
|
if(this.value == 'every-week') {
|
|
$('div#weekday_indexes').parent().hide();
|
|
} else {
|
|
$('div#weekday_indexes').parent().show();
|
|
}
|
|
}).change();
|
|
</script>
|
|
</form>
|
|
{% endblock %}
|