Create a Modal popup with buttons I am having issues opening a modal with buttons using OpenModalDialogCommand.
It says in the docs of that command, that it can take as it's 3rd param any Jquery UI option (from http://api.jqueryui.com/dialog/) and it works well, for width/height/class, but anything more advanced i hit a wall. I am trying to make a button but can't figure it out.

$response = new AjaxResponse();
$options = [
    'width' =&gt; '800',
    'height' =&gt; '300',
    'dialogClass' =&gt; 'no-close',
    'buttons' =&gt; [
      'text' =&gt; 'Proceed',
      'click' =&gt; 'function() {alert();}'
    ]
];

$response-&gt;addCommand(new OpenModalDialogCommand('Title', 'Body', $options));
return $response;


This returns a modal successfully, width is ok, height is ok, class is ok, but there is not button, i tried 3/4 variations of it with no luck.

~p.s. i know i can make a simple form with one button, and return that in the modal, but there has got to be a way to make this work.
Ok figured it out.

$options = [
    'dialogClass' =&gt; 'my-form',
    'buttons' =&gt; [
        'button1' =&gt; [
            'text' =&gt; 'Proceed',
            'id' =&gt; 'onClickDoSomething',
        ]
    ]
];


And then in the .js file just write a function which fires when clickcing on a selector with the id onClickDoSomething voila, it's working.