Skip to content

Commit 22fc874

Browse files
committed
Min fix
1 parent bae355a commit 22fc874

File tree

2 files changed

+128
-132
lines changed

2 files changed

+128
-132
lines changed

public/lib/kanban/js/Kanban.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ class GLPIKanbanRights {
965965

966966
const data = {
967967
inputs: inputs,
968-
itemtype: form.prop('id').split('_')[2],
968+
itemtype: 'GlpiPlugin\\Tasklists\\Task',
969969
action: 'add_item'
970970
};
971971

@@ -1715,7 +1715,7 @@ class GLPIKanbanRights {
17151715
}
17161716

17171717
const uniqueID = Math.floor(Math.random() * 999999);
1718-
const formID = "form_add_" + itemtype + "_" + uniqueID;
1718+
const formID = "form_add_" + 'Tasklists' + "_" + uniqueID;
17191719
let add_form = "<form id='" + formID + "' class='kanban-add-form card kanban-form no-track'>";
17201720
let form_header = "<div class='kanban-item-header'>";
17211721
form_header += `
@@ -1776,7 +1776,7 @@ class GLPIKanbanRights {
17761776
}
17771777

17781778
const uniqueID = Math.floor(Math.random() * 999999);
1779-
const formID = "form_add_" + itemtype + "_" + uniqueID;
1779+
const formID = "form_add_" + 'Tasklists' + "_" + uniqueID;
17801780
let add_form = "<form id='" + formID + "' class='kanban-add-form kanban-bulk-add-form kanban-form no-track'>";
17811781

17821782
add_form += `
@@ -1817,7 +1817,7 @@ class GLPIKanbanRights {
18171817
add_form += "<input type='submit' value='" + __('Add', 'tasklists') + "' name='add' class='submit'/>";
18181818
add_form += "</form>";
18191819
$(column_el.find('.kanban-body')[0]).append(add_form);
1820-
$('#' + formID).get(0).scrollIntoView(false);
1820+
// $('#' + formID).get(0).scrollIntoView(false);
18211821
$("#" + formID).on('submit', function(e) {
18221822
e.preventDefault();
18231823
const form = $(e.target);
@@ -1828,7 +1828,7 @@ class GLPIKanbanRights {
18281828
});
18291829
const data = {
18301830
inputs: inputs,
1831-
itemtype: form.prop('id').split('_')[2],
1831+
itemtype: 'GlpiPlugin\\Tasklists\\Task',
18321832
action: 'bulk_add_item'
18331833
};
18341834

0 commit comments

Comments
 (0)