Fix filtering when exporting stages list
This commit is contained in:
parent
d4435c02ab
commit
49262dca27
2 changed files with 6 additions and 3 deletions
|
|
@ -203,8 +203,10 @@ $(document).ready(function() {
|
|||
);
|
||||
});
|
||||
|
||||
$('input#export').click(function() {
|
||||
$('form#list_export').attr('action', '/stages/export/?filter=' + $('#period_select').val()).submit();
|
||||
$('input#export').click(function(ev) {
|
||||
ev.preventDefault();
|
||||
$('form#list_export').find('input#filter').val($('#period_select').val());
|
||||
$('form#list_export').submit();
|
||||
});
|
||||
|
||||
update_periods($('#section_select').val());
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@
|
|||
<h3>Stages planifiés pour la période choisie</h3>
|
||||
<ul id="training_list">-
|
||||
</ul>
|
||||
<form id="list_export" method="get" action=".">{% csrf_token %}
|
||||
<form id="list_export" method="get" action="{% url 'stages_export' %}">{% csrf_token %}
|
||||
<input id="filter" name="filter" type="hidden" value="">
|
||||
<input id="export" type="button" value="Exporter la liste">
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue