40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
{% load i18n %}
|
|
|
|
<div class="section">
|
|
<h3>{% trans "Timesheet configuration" %}</h3>
|
|
<div>
|
|
<form id="timesheet">
|
|
{{ form.as_p }}
|
|
<script>
|
|
$(function() {
|
|
$('#id_date_display').on('change', function() {
|
|
if ($(this).val() == 'custom') {
|
|
$('#id_custom_nb_dates_per_page').parent().show();
|
|
} else {
|
|
$('#id_custom_nb_dates_per_page').parent().hide();
|
|
}
|
|
});
|
|
$('#id_date_display').trigger('change');
|
|
$('#id_group_by').on('change', function() {
|
|
if ($(this).val()) {
|
|
$('#id_with_page_break').parent().show();
|
|
} else {
|
|
$('#id_with_page_break').parent().hide();
|
|
}
|
|
});
|
|
$('#id_group_by').trigger('change');
|
|
});
|
|
</script>
|
|
<button class="submit-button">{% trans "See timesheet" %}</button>
|
|
{% if request.GET and form.is_valid %}
|
|
<button class="submit-button" name="pdf">{% trans "Get PDF file" %}</button>
|
|
<button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
|
|
{% endif %}
|
|
</form>
|
|
|
|
{% if request.GET and form.is_valid %}
|
|
{% include 'chrono/manager_events_timesheet_fragment.html' %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|