当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Widget_Form::_prepareLayout方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form::_prepareLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form::_prepareLayout方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Form::_prepareLayout怎么用?PHP Mage_Adminhtml_Block_Widget_Form::_prepareLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Widget_Form的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Form::_prepareLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _prepareLayout

 protected function _prepareLayout()
 {
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $this->__('Add Variable'), 'onclick' => 'return variablesSourceControl.addItem()', 'class' => 'add'));
     $button->setName('add_variable_item_button');
     $this->setChild('add_button', $button);
     return parent::_prepareLayout();
 }
开发者ID:dragontheme1235,项目名称:project-1,代码行数:7,代码来源:Variables.php

示例2: _prepareLayout

 protected function _prepareLayout()
 {
     $onclick = "form_payment.submit();";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->addData(array('label' => Mage::helper('purchase')->__('Submit Info'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:7,代码来源:Payment.php

示例3: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))), 'method' => 'post'));
     $form->setFieldNameSuffix('quickresponse');
     $id = $this->getRequest()->getParam('id');
     $fieldset = $form->addFieldset('quickresponse_fieldset', array('legend' => Mage::helper('webforms')->__('Quick Response')));
     $fieldset->addField('title', 'text', array('label' => Mage::helper('webforms')->__('Title'), 'class' => 'required-entry', 'required' => true, 'style' => 'width:700px;', 'name' => 'title'));
     $editor_type = 'textarea';
     $config = '';
     if ((double) substr(Mage::getVersion(), 0, 3) > 1.3 && substr(Mage::getVersion(), 0, 5) != '1.4.0' || Mage::helper('webforms')->getMageEdition() == 'EE') {
         $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('tab_id' => $this->getTabId()));
         $wysiwygConfig["files_browser_window_url"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index');
         $wysiwygConfig["directives_url"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
         $wysiwygConfig["directives_url_quoted"] = Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive');
         $wysiwygConfig["add_widgets"] = false;
         $wysiwygConfig["add_variables"] = false;
         $wysiwygConfig["widget_plugin_src"] = false;
         $plugins = $wysiwygConfig->setData("plugins", array());
         $editor_type = 'editor';
         $config = $wysiwygConfig;
     }
     $fieldset->addField('message', $editor_type, array('label' => Mage::helper('webforms')->__('Message'), 'title' => Mage::helper('webforms')->__('Message'), 'style' => 'width:700px; height:300px;', 'name' => 'message', 'required' => true, 'config' => $config));
     if (Mage::getSingleton('adminhtml/session')->getFormData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getFormData());
         Mage::getSingleton('adminhtml/session')->setFormData(false);
     } elseif (Mage::registry('quickresponse')->getId()) {
         $form->setValues(Mage::registry('quickresponse')->getData());
     }
     $form->addField('quickresponse_id', 'hidden', array('name' => 'quickresponse_id', 'value' => $id));
     $form->addField('saveandcontinue', 'hidden', array('name' => 'saveandcontinue'));
     $form->setUseContainer(true);
     $this->setForm($form);
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:34,代码来源:VladimirPopov_WebForms_Block_Adminhtml_Quickresponse_Edit_Form.php

示例4: _prepareLayout

 /**
  * Prepare layout.
  * Add files to use dialog windows
  *
  * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
  */
 protected function _prepareLayout()
 {
     if ($head = $this->getLayout()->getBlock('head')) {
         $head->setCanLoadExtJs(1)->addJs('mage/adminhtml/variables.js')->addJs('mage/adminhtml/wysiwyg/widget.js')->addJs('lib/flex.js')->addJs('lib/FABridge.js')->addJs('mage/adminhtml/flexuploader.js')->addJs('mage/adminhtml/browser.js')->addJs('prototype/window.js')->addItem('js_css', 'prototype/windows/themes/default.css')->addCss('lib/prototype/windows/themes/magento.css');
     }
     return parent::_prepareLayout();
 }
开发者ID:santhosh400,项目名称:ecart,代码行数:13,代码来源:Form.php

示例5: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('delete_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Customer_Helper_Data')->__('Delete Address'), 'name' => 'delete_address', 'element_name' => 'delete_address', 'disabled' => $this->isReadonly(), 'class' => 'delete' . ($this->isReadonly() ? ' disabled' : ''))));
     $this->setChild('add_address_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Customer_Helper_Data')->__('Add New Address'), 'id' => 'add_address_button', 'name' => 'add_address_button', 'element_name' => 'add_address_button', 'disabled' => $this->isReadonly(), 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''), 'onclick' => 'customerAddresses.addNewAddress()')));
     $this->setChild('cancel_button', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array('label' => Mage::helper('Mage_Customer_Helper_Data')->__('Cancel'), 'id' => 'cancel_add_address' . $this->getTemplatePrefix(), 'name' => 'cancel_address', 'element_name' => 'cancel_address', 'class' => 'cancel delete-address' . ($this->isReadonly() ? ' disabled' : ''), 'disabled' => $this->isReadonly(), 'onclick' => 'customerAddresses.cancelAdd(this)')));
     return parent::_prepareLayout();
 }
开发者ID:nemphys,项目名称:magento2,代码行数:7,代码来源:Addresses.php

示例6: _prepareLayout

 protected function _prepareLayout()
 {
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('customer')->__('Delete Address'), 'name' => 'delete_address', 'class' => 'delete')));
     $this->setChild('add_address_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('customer')->__('Add New Address'), 'id' => 'add_address_button', 'name' => 'add_address_button', 'class' => 'add', 'onclick' => 'customerAddresses.addNewAddress()')));
     $this->setChild('cancel_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('customer')->__('Cancel'), 'id' => 'cancel_add_address' . $this->getTemplatePrefix(), 'name' => 'cancel_address', 'class' => 'cancel delete-address', 'onclick' => 'customerAddresses.cancelAdd(this)')));
     return parent::_prepareLayout();
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:7,代码来源:Addresses.php

示例7: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'), 'webform_id' => $this->getRequest()->getParam('webform_id'), 'store' => $this->getRequest()->getParam('store'))), 'method' => 'post'));
     $renderer = $this->getLayout()->createBlock('webforms/adminhtml_element_field');
     $form->setFieldsetElementRenderer($renderer);
     $form->setFieldNameSuffix('logic');
     $form->setDataObject(Mage::registry('logic'));
     $fieldset = $form->addFieldset('fieldset_information', array('legend' => Mage::helper('webforms')->__('Logic Rule')));
     $fieldset->addField('logic_condition', 'select', array('label' => Mage::helper('webforms')->__('Condition'), 'name' => 'logic_condition', 'options' => Mage::getModel('webforms/logic_condition')->getOptions()));
     $fieldset->addField('value', 'multiselect', array('label' => Mage::helper('webforms')->__('Trigger value(s)'), 'required' => true, 'name' => 'value', 'note' => Mage::helper('webforms')->__('Select one or multiple trigger values.<br>Please, configure for each locale <b>Store View</b>.'), 'values' => Mage::registry('field')->getOptionsArray()));
     $fieldset->addField('action', 'select', array('label' => Mage::helper('webforms')->__('Action'), 'name' => 'action', 'options' => Mage::getModel('webforms/logic_action')->getOptions(), 'note' => Mage::helper('webforms')->__('Action to perform with target elements')));
     $fieldset->addField('target', 'multiselect', array('label' => Mage::helper('webforms')->__('Target element(s)'), 'required' => true, 'name' => 'target', 'note' => Mage::helper('webforms')->__('Select one or multiple target elements'), 'values' => Mage::registry('field')->getLogicTargetOptionsArray()));
     if (Mage::registry('field')->getType() == 'select/checkbox') {
         $fieldset->addField('aggregation', 'select', array('label' => Mage::helper('webforms')->__('Logic aggregation'), 'name' => 'aggregation', 'options' => Mage::getModel('webforms/logic_aggregation')->getOptions()));
     }
     $fieldset->addField('is_active', 'select', array('label' => Mage::helper('webforms')->__('Status'), 'title' => Mage::helper('webforms')->__('Status'), 'name' => 'is_active', 'options' => Mage::getModel('webforms/webforms')->getAvailableStatuses()));
     $form->addField('field_id', 'hidden', array('name' => 'field_id'));
     $form->addField('saveandcontinue', 'hidden', array('name' => 'saveandcontinue'));
     if (Mage::getSingleton('adminhtml/session')->getWebFormsData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getWebFormsData());
         Mage::getSingleton('adminhtml/session')->setWebFormsData(null);
     } elseif (Mage::registry('logic')) {
         $form->setValues(Mage::registry('logic')->getData());
     }
     $form->setUseContainer(true);
     Mage::dispatchEvent('webforms_adminhtml_logic_edit_form_prepare_layout', array('form' => $form));
     $this->setForm($form);
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:29,代码来源:VladimirPopov_WebForms_Block_Adminhtml_Logic_Edit_Form.php

示例8: _prepareLayout

 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('order_history_block').parentNode, '" . $this->getSubmitUrl() . "')";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('translate')->__('Submit Search'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:7,代码来源:Form.php

示例9: _prepareLayout

 /**
  * Prepare layout.
  * Add files to use dialog windows
  *
  * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
  */
 protected function _prepareLayout()
 {
     if ($head = $this->getLayout()->getBlock('head')) {
         $head->addItem('js', 'prototype/window.js')->addItem('js_css', 'prototype/windows/themes/default.css')->addCss('lib/prototype/windows/themes/magento.css')->addItem('js_css', 'tiny_mce/plugins/esites_editor/js/vendor/codemirror/lib/codemirror.css')->addItem('js_css', 'tiny_mce/plugins/esites_editor/css/styles.css')->addItem('js', 'tiny_mce/tiny_mce.js')->addItem('js', 'tiny_mce/plugins/esites_editor/js/vendor/requirejs/require.min.js')->addItem('js', 'mage/adminhtml/variables.js');
     }
     return parent::_prepareLayout();
 }
开发者ID:finelinePG,项目名称:finelink-dev,代码行数:13,代码来源:Form.php

示例10: _prepareLayout

 /**
  * Prepare layout.
  * Add files to use dialog windows
  *
  * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
  */
 protected function _prepareLayout()
 {
     if ($head = $this->getLayout()->getBlock('head')) {
         $head->addItem('js', 'prototype/window.js')->addItem('js_css', 'prototype/windows/themes/default.css')->addItem('js_css', 'prototype/windows/themes/magento.css')->addItem('js', 'mage/adminhtml/variables.js');
     }
     return parent::_prepareLayout();
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:13,代码来源:Form.php

示例11: _prepareLayout

 protected function _prepareLayout()
 {
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Option'), 'onclick' => 'return customOptionsSourceControl.addItem()', 'class' => 'add'));
     $button->setName('add_custom_option_item_button');
     $this->setChild('add_button', $button);
     return parent::_prepareLayout();
 }
开发者ID:aram93,项目名称:mage-enhanced-admin-grids,代码行数:7,代码来源:List.php

示例12: _prepareLayout

 /**
  * Prepare form for render
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $form = new Varien_Data_Form();
     $customerGroup = Mage::registry('current_group');
     $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('customer')->__('Group Information')));
     $name = $fieldset->addField('customer_group_code', 'text', array('name' => 'code', 'label' => Mage::helper('customer')->__('Group Name'), 'title' => Mage::helper('customer')->__('Group Name'), 'class' => 'required-entry', 'required' => true));
     if ($customerGroup->getId() == 0 && $customerGroup->getCustomerGroupCode()) {
         $name->setDisabled(true);
     }
     $fieldset->addField('tax_class_id', 'select', array('name' => 'tax_class', 'label' => Mage::helper('customer')->__('Tax class'), 'title' => Mage::helper('customer')->__('Tax class'), 'class' => 'required-entry', 'required' => true, 'values' => Mage::getSingleton('tax/class_source_customer')->toOptionArray()));
     if (!is_null($customerGroup->getId())) {
         // If edit add id
         $form->addField('id', 'hidden', array('name' => 'id', 'value' => $customerGroup->getId()));
     }
     if (Mage::getSingleton('adminhtml/session')->getCustomerGroupData()) {
         $form->addValues(Mage::getSingleton('adminhtml/session')->getCustomerGroupData());
         Mage::getSingleton('adminhtml/session')->setCustomerGroupData(null);
     } else {
         $form->addValues($customerGroup->getData());
     }
     $form->setUseContainer(true);
     $form->setId('edit_form');
     $form->setAction($this->getUrl('*/*/save'));
     $this->setForm($form);
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:29,代码来源:Form.php

示例13: _prepareLayout

 /**
  * Prepare layout.
  * Add files to use dialog windows
  *
  * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form
  */
 protected function _prepareLayout()
 {
     if ($head = $this->getLayout()->getBlock('head')) {
         $head->addJs('prototype/window.js')->addCss('prototype/windows/themes/default.css')->addCss('Mage_Core::prototype/magento.css')->addJs('Mage_Adminhtml::variables.js');
     }
     return parent::_prepareLayout();
 }
开发者ID:natxetee,项目名称:magento2,代码行数:13,代码来源:Form.php

示例14: _prepareLayout

 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     // create client-side block
     $this->_prepareClientSideBlock();
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:cupboardglasspipes.ecomitize.com,代码行数:7,代码来源:Form.php

示例15: _prepareLayout

 /**
  * @return Mage_Core_Block_Abstract
  */
 protected function _prepareLayout()
 {
     $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete'), 'class' => 'delete delete-option')));
     $this->setChild('add_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('eav')->__('Add Option'), 'class' => 'add', 'id' => 'add_new_option_button')));
     $this->setChild('add_image_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => '{{add_image_button}}', 'class' => 'add', 'id' => 'new-option-file-{{id}}', 'onclick' => 'feeOption.createFileField(this.id)')));
     return parent::_prepareLayout();
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:10,代码来源:Options.php


注:本文中的Mage_Adminhtml_Block_Widget_Form::_prepareLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。