本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form_Container类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form_Container类的具体用法?PHP Mage_Adminhtml_Block_Widget_Form_Container怎么用?PHP Mage_Adminhtml_Block_Widget_Form_Container使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Form_Container类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
// Initialization block
//------------------------------
$this->setId('license');
$this->_blockGroup = 'M2ePro';
$this->_controller = 'adminhtml';
$this->_mode = 'license';
//------------------------------
// Set header text
//------------------------------
$this->_headerText = Mage::helper('M2ePro')->__('License');
//------------------------------
// Set buttons actions
//------------------------------
$this->removeButton('back');
$this->removeButton('reset');
$this->removeButton('delete');
$this->removeButton('add');
$this->removeButton('save');
$this->removeButton('edit');
if (Mage::getModel('M2ePro/Wizard')->isActive() && Mage::getModel('M2ePro/Wizard')->getStatus() == Ess_M2ePro_Model_Wizard::STATUS_LICENSE) {
$this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlersObj.reset_click()', 'class' => 'reset'));
$this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Complete This Step'), 'onclick' => 'LicenseHandlersObj.completeStep();', 'class' => 'close'));
} else {
$this->_addButton('goto_about', array('label' => Mage::helper('M2ePro')->__('About'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_about/index') . '\')', 'class' => 'button_link'));
$this->_addButton('goto_support', array('label' => Mage::helper('M2ePro')->__('Support'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_support/index') . '\')', 'class' => 'button_link'));
$docsLink = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/documentation/', 'baseurl');
$this->_addButton('goto_docs', array('label' => Mage::helper('M2ePro')->__('Documentation'), 'onclick' => 'window.open(\'' . $docsLink . '\', \'M2ePro Documentation \' + \'' . $docsLink . '\'); return false;', 'class' => 'button_link'));
$this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'LicenseHandlersObj.reset_click()', 'class' => 'reset'));
}
//------------------------------
}
示例2: __construct
public function __construct()
{
parent::__construct();
// Initialization block
//------------------------------
$this->setId('listingsAddStepOne');
$this->_blockGroup = 'M2ePro';
$this->_controller = 'adminhtml_listings';
$this->_mode = 'edit';
//------------------------------
// Set header text
//------------------------------
$this->_headerText = Mage::helper('M2ePro')->__('Add Listing [Settings]');
//------------------------------
// Set buttons actions
//------------------------------
$this->removeButton('back');
$this->removeButton('reset');
$this->removeButton('delete');
$this->removeButton('add');
$this->removeButton('save');
$this->removeButton('edit');
$this->_addButton('back', array('label' => Mage::helper('M2ePro')->__('Back'), 'onclick' => 'ListingEditHandlersObj.back_click(\'' . $this->getUrl('*/*/index') . '\')', 'class' => 'back'));
$this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'ListingEditHandlersObj.reset_click()', 'class' => 'reset'));
$this->_addButton('save_and_next', array('label' => Mage::helper('M2ePro')->__('Next'), 'onclick' => 'ListingEditHandlersObj.save_click(\'' . $this->getUrl('*/*/add', array('step' => '1')) . '\')', 'class' => 'next'));
//------------------------------
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->_objectId = 'id';
$this->_blockGroup = 'massimporterpro';
$this->_controller = 'adminhtml_priceupdater';
$this->removeButton('back');
$helper = Mage::helper('massimporterpro');
$isValid = $helper->isValid();
$isActive = $helper->isActive();
$message = '';
if (!$isActive) {
$message = base64_decode('RXh0ZW5zaW9uIGhhcyBiZWVuIGRpc2FibGVkLiBQbGVhc2UgZW5hYmxlIGl0IGZyb20gTWFzcyBJbXBvcnRlciBQcm8gJnJhcXVvOyBNYW5hZ2UgU2V0dGluZ3M=');
} else {
if ($isActive && !$isValid) {
$message = base64_decode('UGxlYXNlIGVudGVyIGEgdmFsaWQgbGljZW5zZSBrZXkgaW4gb3JkZXIgdG8gcnVuIHRoZSBleHRlbnNpb24=');
}
}
if (!$isActive || $isActive && !$isValid) {
$this->removeButton('save');
$this->_addButton('dsave', array('label' => Mage::helper('massimporterpro')->__('Run Import'), 'onclick' => 'alert(\'' . $message . '.\')', 'class' => 'disabled'), -100);
} else {
$this->_updateButton('save', 'label', Mage::helper('massimporterpro')->__('Run Import'));
}
$this->_formScripts[] = "\n function addUploadFile(){\n\t\t\t\tvar importFile = \$('import_file_upload').value;\n\t\t\t\tif(importFile == ''){\n\t\t\t\t\talert('Please select some import file.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar ext = importFile.substring(importFile.lastIndexOf('.') + 1);\n\t\t\t\tif(ext.toLowerCase() != 'csv'){\n\t\t\t\t\talert('Please select valid import file (CSV).');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//tweak for required feilds: import file section, delimiter, enclosed\n\t\t\t\t\$('import_file').removeClassName('required-entry');\n\t\t\t\t\$('delimiter').removeClassName('required-entry');\n\t\t\t\t\$('enclosure').removeClassName('required-entry');\n editForm.submit('" . Mage::helper('adminhtml')->getUrl('massimporterpro/adminhtml_priceupdater/uploadCsv') . "');\n }\n ";
}
示例4: __construct
public function __construct()
{
$this->_objectId = 'invoice_id';
$this->_controller = 'sales_order_invoice';
$this->_mode = 'view';
$this->_session = Mage::getSingleton('admin/session');
parent::__construct();
$this->_removeButton('save');
$this->_removeButton('reset');
$this->_removeButton('delete');
if ($this->_isAllowedAction('cancel') && $this->getInvoice()->canCancel()) {
$this->_addButton('cancel', array('label' => Mage::helper('sales')->__('Cancel'), 'class' => 'delete', 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')'));
}
if ($this->_isAllowedAction('emails')) {
$this->addButton('send_notification', array('label' => Mage::helper('sales')->__('Send Email'), 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') . '\', \'' . $this->getEmailUrl() . '\')'));
}
$orderPayment = $this->getInvoice()->getOrder()->getPayment();
if ($this->_isAllowedAction('creditmemo') && $this->getInvoice()->getOrder()->canCreditmemo()) {
if ($orderPayment->canRefundPartialPerInvoice() && $this->getInvoice()->canRefund() && $orderPayment->getAmountPaid() > $orderPayment->getAmountRefunded() || $orderPayment->canRefund() && !$this->getInvoice()->getIsUsedForRefund()) {
$this->_addButton('capture', array('label' => Mage::helper('sales')->__('Credit Memo'), 'class' => 'go', 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')'));
}
}
if ($this->_isAllowedAction('capture') && $this->getInvoice()->canCapture()) {
$this->_addButton('capture', array('label' => Mage::helper('sales')->__('Capture'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')'));
}
if ($this->getInvoice()->canVoid()) {
$this->_addButton('void', array('label' => Mage::helper('sales')->__('Void'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')'));
}
if ($this->getInvoice()->getId()) {
$this->_addButton('print', array('label' => Mage::helper('sales')->__('Print'), 'class' => 'save', 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'));
}
}
示例5: __construct
/**
* Init class
*
*/
public function __construct()
{
switch (Mage::registry('store_type')) {
case 'website':
$this->_objectId = 'website_id';
$saveLabel = Mage::helper('core')->__('Save Website');
$deleteLabel = Mage::helper('core')->__('Delete Website');
$deleteUrl = $this->getUrl('*/*/deleteWebsite', array('item_id' => Mage::registry('store_data')->getId()));
break;
case 'group':
$this->_objectId = 'group_id';
$saveLabel = Mage::helper('core')->__('Save Store');
$deleteLabel = Mage::helper('core')->__('Delete Store');
$deleteUrl = $this->getUrl('*/*/deleteGroup', array('item_id' => Mage::registry('store_data')->getId()));
break;
case 'store':
$this->_objectId = 'store_id';
$saveLabel = Mage::helper('core')->__('Save Store View');
$deleteLabel = Mage::helper('core')->__('Delete Store View');
$deleteUrl = $this->getUrl('*/*/deleteStore', array('item_id' => Mage::registry('store_data')->getId()));
break;
}
$this->_controller = 'system_store';
parent::__construct();
$this->_updateButton('save', 'label', $saveLabel);
$this->_updateButton('delete', 'label', $deleteLabel);
$this->_updateButton('delete', 'onclick', 'setLocation(\'' . $deleteUrl . '\');');
if (!Mage::registry('store_data')->isCanDelete()) {
$this->_removeButton('delete');
}
if (Mage::registry('store_data')->isReadOnly()) {
$this->_removeButton('save')->_removeButton('reset');
}
}
示例6: __construct
public function __construct()
{
$this->_blockGroup = 'sagepayreporting';
$this->_controller = 'adminhtml_sagepayreporting_whitelistip';
parent::__construct();
$this->_updateButton('save', 'label', Mage::helper('sagepayreporting')->__('Add'));
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->_objectId = 'id';
$this->_blockGroup = 'produp1';
$this->_controller = 'adminhtml_produp1';
$this->_updateButton('save', 'label', Mage::helper('produp1')->__('Save Item'));
$this->_updateButton('delete', 'label', Mage::helper('produp1')->__('Delete Item'));
$this->_addButton('saveandcontinue', array(
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
'onclick' => 'saveAndContinueEdit()',
'class' => 'save',
), -100);
$this->_formScripts[] = "
function toggleEditor() {
if (tinyMCE.getInstanceById('produp1_content') == null) {
tinyMCE.execCommand('mceAddControl', false, 'produp1_content');
} else {
tinyMCE.execCommand('mceRemoveControl', false, 'produp1_content');
}
}
function saveAndContinueEdit(){
editForm.submit($('edit_form').action+'back/edit/');
}
";
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->_objectId = 'id';
$this->_blockGroup = 'amfeed';
$this->_controller = 'adminhtml_field';
}
示例9: _prepareLayout
protected function _prepareLayout()
{
if ($this->_blockGroup && $this->_controller && $this->_mode) {
$this->setChild('form', $this->getLayout()->createBlock($this->_blockGroup . '/' . $this->_controller . '_' . $this->_mode . '_form'));
}
return parent::_prepareLayout();
}
示例10: _construct
/**
* Internal constructor
*/
protected function _construct()
{
parent::_construct();
$this->_objectId = 'rate_id';
$this->_blockGroup = 'enterprise_reward';
$this->_controller = 'adminhtml_reward_rate';
}
示例11: __construct
public function __construct()
{
parent::__construct();
$source = $this->getRequest()->getParam('id');
$this->_objectId = 'id';
$this->_blockGroup = 'inventoryplus';
$this->_controller = 'adminhtml_stock';
$showcustomer_url = Mage::helper('adminhtml')->getUrl('inventoryplusadmin/adminhtml_stock/showcustomer');
$admin = Mage::getSingleton('admin/session')->getUser();
$this->_removeButton('delete');
$this->_removeButton('reset');
$this->_removeButton('back');
$stockActions = array();
$stockActions['adjuststock'] = array('params' => array('label' => Mage::helper('inventoryplus')->__('Adjust Stock'), 'onclick' => 'location.href=\'' . $this->getUrl('*/adminhtml_adjuststock/new') . '\'', 'class' => 'save'), 'position' => 10);
/* Quick adjust stock button */
$this->_updateButton('save', 'label', Mage::helper('inventoryplus')->__('Update Stock In-grid'));
$this->_updateButton('save', 'onclick', 'IMmassUpdateStock()');
$this->_updateButton('save', 'area', 'after_header');
/* End of Qucik adjust stock button */
$stockActionsObject = new Varien_Object(array('actions' => $stockActions));
Mage::dispatchEvent('inventoryplus_inventory_stock_action_buttons', array('stock_actions_object' => $stockActionsObject));
$this->_generateStockActionButtons($stockActionsObject);
$this->setTemplate('inventoryplus/stock/content-header.phtml');
$this->_formScripts[] = " \n function IMmassUpdateStock(){\n if(\$('select_warehouse') && \$('select_warehouse').getValue() == '0'){\n alert('" . $this->__('Please select a warehouse to view stock & perform in-grid update.') . "');\n \$('select_warehouse').addClassName('highlight');\n window.scrollTo(0, 0);\n return;\n }\n var r=confirm('" . Mage::helper('inventoryplus')->__('Are you sure you want to update Qty. of products?') . "'); \n if (r==true){\n editForm.submit(\$('edit_form').action);\n }\n } \n \n function IMselectWarehouse() {\n \$('select_warehouse').removeClassName('highlight');\n }\n \n function toggleEditor() {\n if (tinyMCE.getInstanceById('inventory_content') == null)\n tinyMCE.execCommand('mceAddControl', false, 'inventory_content');\n else\n tinyMCE.execCommand('mceRemoveControl', false, 'inventory_content');\n } \n \n ";
}
示例12: _construct
/**
* Initialize form
* Add standard buttons
* Add "Save and Continue" button
*/
protected function _construct()
{
$this->_objectId = 'id';
$this->_controller = 'promo_quote';
parent::_construct();
$this->_addButton('save_and_continue_edit', array('class' => 'save', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), 'data_attribute' => array('mage-init' => array('button' => array('event' => 'saveAndContinueEdit', 'target' => '#edit_form')))), 10);
}
示例13: _prepareLayout
protected function _prepareLayout()
{
if (!Mage::registry('current_customer')->isReadonly()) {
$this->_addButton('save_and_continue', array('label' => Mage::helper('customer')->__('Save and Continue Edit'), 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', 'class' => 'save'), 10);
}
return parent::_prepareLayout();
}
示例14: getFormHtml
public function getFormHtml()
{
if ($this->getChild('form')) {
return parent::getFormHtml();
}
return '';
}
示例15: __construct
public function __construct()
{
$this->_objectId = 'id';
$this->_blockGroup = 'advancednewsletter';
$this->_controller = 'adminhtml_subscriber';
parent::__construct();
}