forked from taxjar/taxjar-magento2-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support address validation in new backend customer address modal for …
…Magento 2.3, fix JS errors
- Loading branch information
1 parent
5e14152
commit a0c17fb
Showing
8 changed files
with
132 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* Taxjar_SalesTax | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category Taxjar | ||
* @package Taxjar_SalesTax | ||
* @copyright Copyright (c) 2017 TaxJar. TaxJar is a trademark of TPS Unlimited, Inc. (http://www.taxjar.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
namespace Taxjar\SalesTax\Block\Adminhtml\Customer\Edit\Address; | ||
|
||
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; | ||
use Magento\Customer\Block\Adminhtml\Edit\GenericButton; | ||
|
||
class ValidateButton extends GenericButton implements ButtonProviderInterface | ||
{ | ||
/** | ||
* @inheritdoc | ||
* | ||
* @return array | ||
*/ | ||
public function getButtonData() | ||
{ | ||
return [ | ||
'label' => __('Validate Address'), | ||
'on_click' => '', | ||
'data_attribute' => [ | ||
'mage-init' => [ | ||
'Magento_Ui/js/form/button-adapter' => [ | ||
'actions' => [ | ||
[ | ||
'targetName' => 'addressValidation', | ||
'actionName' => 'validateAddress' | ||
], | ||
], | ||
], | ||
], | ||
], | ||
'sort_order' => 30 | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Taxjar_SalesTax | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category Taxjar | ||
* @package Taxjar_SalesTax | ||
* @copyright Copyright (c) 2017 TaxJar. TaxJar is a trademark of TPS Unlimited, Inc. (http://www.taxjar.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
--> | ||
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> | ||
<settings> | ||
<buttons> | ||
<button name="validate" class="Taxjar\SalesTax\Block\Adminhtml\Customer\Edit\Address\ValidateButton"/> | ||
</buttons> | ||
</settings> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters