mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 00:02:17 +02:00
Fix some strange behavior
This commit is contained in:
@@ -465,7 +465,10 @@ $('#datatable_dlg_{{ oUIBlock.GetId() }}').DataTableSettings(aOptions{{ sListIDF
|
||||
$('body').append($('<form/>')
|
||||
.attr({'method': 'post', 'id': 'basket{{ oUIBlock.GetId() }}'})
|
||||
.append($('<input/>')
|
||||
.attr({'type': 'hidden', 'name': 'filter', 'value': "{{ oUIBlock.GetFilter()|raw }}"})
|
||||
.attr({'type': 'hidden', 'name': 'basket_filter', 'value': "{{ oUIBlock.GetBasketFilter()|raw }}"})
|
||||
)
|
||||
.append($('<input/>')
|
||||
.attr({'type': 'hidden', 'name': 'basket_class', 'value': "{{ oUIBlock.GetBasketClass()|raw }}"})
|
||||
)
|
||||
.append($('<input/>')
|
||||
.attr({'type': 'hidden', 'name': 'back_url', 'value': window.location.href})
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
{% block iboNavigation %}
|
||||
<form id='ibo-form-navigation' class='ibo-navigation-form' method='post'>
|
||||
<input type='hidden' name='list_navigation' value='{{ oUIBlock.GetList() }}'/>
|
||||
<input type='hidden' name='filter' value='{{ oUIBlock.GetFilter() }}'/>
|
||||
<input type='hidden' name='basket_class' value='{{ oUIBlock.GetBasketClass() }}'/>
|
||||
<input type='hidden' name='basket_filter' value='{{ oUIBlock.GetBasketFilter() }}'/>
|
||||
<input type='hidden' name='back_posted_fields' value='{{ oUIBlock.GetPostedFields()|raw }}'/>
|
||||
<input type='hidden' name='back_url' value='{{ oUIBlock.GetBackUrl()|raw }}'/>
|
||||
<div class='ibo-form-navigation--nav fas fa-angle-up' id='{{ oUIBlock.GetId() }}-back'></div>
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
|
||||
$('#{{ oUIBlock.GetId() }}-back').on('click', function () {
|
||||
$('#ibo-form-navigation').attr('action', ' {{ oUIBlock.GetBackUrl() | raw }} ');
|
||||
$('#ibo-form-navigation').attr('action', '{{ oUIBlock.GetBackUrl() | raw }}');
|
||||
$('#ibo-form-navigation').attr('method', 'post');
|
||||
$('#ibo-form-navigation').find('[name=basket_filter]').val('');
|
||||
|
||||
JSON.parse('{{ oUIBlock.GetPostedFields() | raw }}', (key, value) => {
|
||||
$('#ibo-form-navigation').append($('<input/>').attr({'type': 'hidden', 'name': key, 'value': value}));
|
||||
});
|
||||
if ('{{ oUIBlock.GetPostedFields() | raw }}' != '')
|
||||
{
|
||||
JSON.parse('{{ oUIBlock.GetPostedFields() | raw }}', (key, value) => {
|
||||
$('#ibo-form-navigation').append($('<input/>').attr({'type': 'hidden', 'name': key, 'value': value}));
|
||||
});
|
||||
}
|
||||
|
||||
$('#ibo-form-navigation').submit();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user