[FIX] HORILLA VIEWS: Quick export URI Too long issue
This commit is contained in:
@@ -398,8 +398,8 @@ class HorillaListView(ListView):
|
|||||||
from import_export import fields, resources
|
from import_export import fields, resources
|
||||||
|
|
||||||
request = getattr(_thread_locals, "request", None)
|
request = getattr(_thread_locals, "request", None)
|
||||||
ids = eval_validate(request.GET["ids"])
|
ids = eval_validate(request.POST["ids"])
|
||||||
_columns = eval_validate(request.GET["columns"])
|
_columns = eval_validate(request.POST["columns"])
|
||||||
queryset = self.model.objects.filter(id__in=ids)
|
queryset = self.model.objects.filter(id__in=ids)
|
||||||
|
|
||||||
_model = self.model
|
_model = self.model
|
||||||
|
|||||||
@@ -18,17 +18,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="oh-modal__dialog-body">
|
<div class="oh-modal__dialog-body">
|
||||||
<form
|
<form
|
||||||
|
method="post"
|
||||||
|
action="/{{export_path}}"
|
||||||
onsubmit="
|
onsubmit="
|
||||||
event.preventDefault();
|
|
||||||
const selectedFields = $('#{{view_id|safe}} input[name=selected_fields]:checked').map(function() {
|
const selectedFields = $('#{{view_id|safe}} input[name=selected_fields]:checked').map(function() {
|
||||||
return [[$(this).attr('data-label'),this.value]];
|
return [[$(this).attr('data-label'),this.value]];
|
||||||
}).get();
|
}).get();
|
||||||
selectedIds = $('#{{selected_instances_key_id}}').attr('data-ids');
|
selectedIds = $('#{{selected_instances_key_id}}').attr('data-ids');
|
||||||
window.location.href = '/{{export_path}}' + '?ids='+selectedIds + '&columns='+JSON.stringify(selectedFields);
|
$(this).find('[name=ids]').val(selectedIds);
|
||||||
event.stopPropagation();$(this).parents().find('.oh-modal--show').last().toggleClass('oh-modal--show');
|
$(this).find('[name=columns]').val(JSON.stringify(selectedFields));
|
||||||
"
|
"
|
||||||
id="candidateExportForm"
|
id="candidateExportForm"
|
||||||
>
|
>
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="ids" id="{{view_id}}ExportIds">
|
||||||
|
<input type="hidden" name="columns" id="{{view_id}}ExportColumns">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
$('#bulk_update_get_form{{view_id}}').click()
|
$('#bulk_update_get_form{{view_id}}').click()
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<ion-icon style="font-size: 1rem; margin-right:0;" name="create"></ion-icon>
|
|
||||||
<span class="label"
|
<span class="label"
|
||||||
{% comment %} style="display: none;" {% endcomment %}
|
{% comment %} style="display: none;" {% endcomment %}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user