Skip to content

How do I add a modal window call button to the admin panel?

I have a module that displays a button to start processing a file. You need to add another button next to it, which will open a modal window where there will be a form for uploading a file to the server along the path /synch/. How can I do it?

<?xml version="1.0" ?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="buttons" xsi:type="array">
            <item name="import" xsi:type="array">
                <item name="name" xsi:type="string">add</item>
                <item name="label" xsi:type="string" translate="true">Go</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/update</item>
            </item>
        </item>
    </argument>
</listing>