19 protected $_template =
'Magento_Tax::toolbar/rate/save.phtml';
45 parent::__construct($context,
$data);
54 $this->
assign(
'createUrl', $this->
getUrl(
'tax/rate/save'));
67 public function addButton($buttonId,
$data, $level = 0, $sortOrder = 0, $region =
'toolbar')
69 $this->buttonList->add($buttonId,
$data, $level, $sortOrder, $region);
81 $this->buttonList->remove($buttonId);
95 $this->buttonList->update($buttonId, $key,
$data);
104 $this->buttonList->add(
107 'label' =>
__(
'Back'),
108 'onclick' =>
'window.location.href=\'' . $this->
getUrl(
'tax/*/') .
'\'',
113 $this->buttonList->add(
115 [
'label' =>
__(
'Reset'),
'onclick' =>
'window.location.reload()',
'class' =>
'reset']
120 $this->buttonList->add(
123 'label' =>
__(
'Delete Rate'),
124 'onclick' =>
'deleteConfirm(\'' .
__(
125 'Are you sure you want to do this?' 126 ) .
'\', \
'' . $this->
getUrl(
135 $this->buttonList->add( 139 'class' => 'save primary save-rate
', 140 'data_attribute
' => [ 141 'mage-init
' => ['button
' => ['event' => 'save
', 'target
' => '#rate-
form']], 145 $this->toolbar->pushButtons($this, $this->buttonList); 146 return parent::_prepareLayout(); 155 public function canRender(\Magento\Backend\Block\Widget\Button\Item $item) 157 return !$item->isDeleted();
if( $form)() ?>< script > require(['jquery' mage mage
jquery extjs ext tree mage adminhtml form
getUrl($route='', $params=[])
assign($key, $value=null)