@ -6,7 +6,7 @@ import {initCompColorPicker} from './comp/ColorPicker.js';
import { showGlobalErrorMessage } from '../bootstrap.js' ;
import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
import { svg } from '../svg.js' ;
import { hideElem , showElem , toggleElem } from '../utils/dom.js' ;
import { hideElem , showElem , toggleElem , initSubmitEventPolyfill , submitEventSubmitter } from '../utils/dom.js' ;
import { htmlEscape } from 'escape-goat' ;
import { showTemporaryTooltip } from '../modules/tippy.js' ;
import { confirmModal } from './comp/ConfirmModal.js' ;
@ -122,7 +122,8 @@ async function formFetchAction(e) {
const formMethod = formEl . getAttribute ( 'method' ) || 'get' ;
const formActionUrl = formEl . getAttribute ( 'action' ) ;
const formData = new FormData ( formEl ) ;
const [ submitterName , submitterValue ] = [ e . submitter ? . getAttribute ( 'name' ) , e . submitter ? . getAttribute ( 'value' ) ] ;
const formSubmitter = submitEventSubmitter ( e ) ;
const [ submitterName , submitterValue ] = [ formSubmitter ? . getAttribute ( 'name' ) , formSubmitter ? . getAttribute ( 'value' ) ] ;
if ( submitterName ) {
formData . append ( submitterName , submitterValue || '' ) ;
}
@ -193,6 +194,7 @@ export function initGlobalCommon() {
$ ( '.tabular.menu .item' ) . tab ( ) ;
initSubmitEventPolyfill ( ) ;
document . addEventListener ( 'submit' , formFetchAction ) ;
document . addEventListener ( 'click' , linkAction ) ;
}