2016-10-17 6 views
0

다음과 같이 관리자 양식에 버튼을 추가했습니다.관리 양식에 버튼을 추가하는 방법은 무엇입니까?

$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')}')", 
)); 

이 필드의 기능은 제대로 작동하지만 버튼이 제대로 나타나지 않습니다. 다음과 같이 나타납니다.

enter image description here

어떻게 정상 젠토 버튼으로 표시하는?

나는

'after_element_html' => '<button type="button" onclick="setLocation('{$this->getUrl('*/*/registeremail')}')">All Registered</button>'

으로 시도했지만 온 클릭 호출은 잘못된 것입니다.

+0

클래스 폼 버튼 추가 시도 –

+0

@ gulshanmaurya가 작동하지 않습니다. – Dissanayake

답변

2

이 나를 위해 작동

$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')}')", 
     )); 

을보십시오. enter image description here

+0

우수. 그것은 작동합니다. – Dissanayake

관련 문제