Dis*_*ake 1 magento magento-1.9
我在管理表单中添加了一个按钮,如下所示。
$fieldset->addField('registered', 'button', array(
'label' => Mage::helper('core')->__('Send e-mail to all registered customers'),
'value' => Mage::helper('core')->__('Button Caption'),
'name' => 'registered',
'onclick' => "setLocation('{$this->getUrl('*/*/registeremail')}')",
));
Run Code Online (Sandbox Code Playgroud)
该字段的功能正常工作,但按钮显示不正确。如下所示。
如何将此按钮显示为普通的magento按钮?
我尝试过
'after_element_html' => '<button type="button" onclick="setLocation('{$this->getUrl('*/*/registeremail')}')">All Registered</button>'
但是onclick调用是错误的。
尝试
$fieldset->addField('registered', 'button', array(
'label' => Mage::helper('core')->__('Send e-mail to all registered customers'),
'value' => Mage::helper('core')->__('Button Caption'),
'name' => 'registered',
'class' => 'form-button',
'onclick' => "setLocation('{$this->getUrl('*/*/registeremail')}')",
));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3772 次 |
| 最近记录: |