Close modal dialog after button click

Options

Hi.

We have to create an autosave form with a custom "OK" and "Cancel" button (Hide the header and the footer of the Rule dialog box). There are several reasons why we have to do it this way. :(

Is there a functionality how we can close the modal dialog after we've clicked one of the mentioned buttons??

My idea was to use "After the action is performed, redirect the user to a specific location" and there use "Go to URL". Sadly I'm not able to call more than one Javascript function.

If I use the following statements in the JS-console of the browser it seems everything is workling fine:

- document.getElementsByClassName("dialog-rul_ECMIPM_Eingang_AendernEingangsattribute")[0].remove();

- document.querySelectorAll("ux-dialog-container")[0].remove();

- document.querySelectorAll("ux-dialog-overlay")[0].remove();

KR Alex