mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°8772 - WIP dependencies - Does not work yet
This commit is contained in:
14
js/forms/forms.js
Normal file
14
js/forms/forms.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function triggerTurbo(el) {
|
||||
let sFormName = el.form.getAttribute("name");
|
||||
el.form.querySelector(`[name="${sFormName}[_turbo_trigger]"]`).value = el.getAttribute('name');
|
||||
el.form.setAttribute('novalidate', true);
|
||||
el.form.requestSubmit();
|
||||
console.log('Auto submitting form due to change in field ' + el.getAttribute('name'));
|
||||
}
|
||||
Reference in New Issue
Block a user