Feature: #90168 - Introduce Modal Actions
See forge#90168
Description
Action buttons in modals created by the TYPO3/
module may
now make use of TYPO3/
and
TYPO3/
.
As an alternative to the existing trigger
option, the new option
action
may be used with an instance of the previously mentioned modules.
Example:
Modal.confirm('Header', 'Some content', Severity.error, [
{
text: 'Based on trigger()',
trigger: function () {
console.log('Vintage!');
}
},
{
text: 'Based on action',
action: new DeferredAction(() => {
return new AjaxRequest('/any/endpoint').post({});
})
}
]);
Copied!
Impact
Activating any action disables all buttons in the modal. Once the action is done, the modal disappears automatically.
Buttons of the type Deferred
render a spinner on activation into the
button.