123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- /**
- * Popup container template.
- *
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- *
- * @var \Magento\Backend\Block\Template $block
- */
- // @codingStandardsIgnoreFile
- ?>
- <script>
- require([
- "jquery",
- 'Magento_Ui/js/modal/confirm',
- "jquery/ui",
- "Magento_Integration/js/integration",
- 'mage/dataPost'
- ], function ($, Confirm) {
- window.integration = new Integration(
- '<?= /* @escapeNotVerified */ $block->getUrl('*/*/permissionsDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
- '<?= /* @escapeNotVerified */ $block->getUrl('*/*/tokensDialog', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
- '<?= /* @escapeNotVerified */ $block->getUrl('*/*/tokensExchange', ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]) ?>',
- '<?= /* @escapeNotVerified */ $block->getUrl('*/*') ?>',
- '<?= /* @escapeNotVerified */ $block->getUrl('*/*/loginSuccessCallback') ?>'
- );
- /**
- * Confirm dialog for delete integration action
- */
- $(function () {
- $('div#integrationGrid').on('click', 'button#delete', function (e) {
- new Confirm({
- title: '<?= /* @escapeNotVerified */ __('Are you sure?') ?>',
- content: "<?= /* @escapeNotVerified */ __("Are you sure you want to delete this integration? You can't undo this action.") ?>",
- actions: {
- confirm: function () {
- $.mage.dataPost().postData({action: $(e.target).data('url'), data: {}});
- }
- }
- });
- e.stopPropagation();
- });
- });
- });
- </script>
- <div id="integration-popup-container" style="display: none;"></div>
|