allow custom export repositories (#2182)

This commit is contained in:
Kevin Papst
2020-12-10 15:00:14 +01:00
committed by GitHub
parent c3fe8d1c39
commit 7a3388646b
18 changed files with 320 additions and 72 deletions

View File

@@ -41,7 +41,9 @@
{{ form_row(form.projects) }}
{{ form_row(form.activities) }}
{{ form_row(form.tags) }}
{{ form_row(form.users) }}
{% if form.users is defined %}
{{ form_row(form.users) }}
{% endif %}
{{ form_row(form.exported) }}
{{ form_row(form.state) }}
{{ form_row(form.markAsExported) }}
@@ -289,13 +291,13 @@
});
$('body').on('click', '#export-buttons .startExportBtn', function() {
$('#type').val($(this).attr('data-type'));
$('#renderer').val($(this).attr('data-type'));
var $form = $("#export-form");
var prevAction = $form.attr('action');
var prevMethod = $form.attr('method');
$form.attr('target', '_blank').attr('method', 'POST').attr('action', '{{ path('export_data') }}');
$form.submit();
$('#type').val('');
$('#renderer').val('');
$form.removeAttr('target').attr('action', prevAction).attr('method', prevMethod);
});
});