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


PHP Varien_Data_Form::setFieldContainerIdPrefix方法代码示例

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


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

示例1: _prepareForm

 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/install/complete'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $accountWithLoginUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_LOGIN));
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Install Remarkety extension')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'install_create'));
     $headingHtml = '<p><b>' . $this->__('Thank you for installing the Remarkety Magento plugin.
             You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!') . '</b><br><br>' . $this->__('The plugin will automatically create a Magento WebService API user so that
             Remarkety can synchronize with your store.') . '</p><hr/>' . '<h2>' . $this->__('Create a new Remarkety account') . '</h2>' . '<p>' . sprintf($this->__('Already registered to Remarkety? <a href="%s">Click here</a>'), $accountWithLoginUrl) . '</p>';
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => $headingHtml));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     $html = '<small style="float:left;width:100%;">' . sprintf($this->__('Already registered to Remarkety? <a href="%s">Click here</a>'), $accountWithLoginUrl) . '</small>';
     $fieldset->addField('email', 'text', array('label' => $this->__('Email address for the Remarkety account:'), 'name' => 'data[email]', 'required' => true, 'class' => 'validate-email', 'style' => 'float:left'));
     $fieldset->addField('first_name', 'text', array('label' => $this->__('First Name:'), 'name' => 'data[first_name]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('last_name', 'text', array('label' => $this->__('Last Name:'), 'name' => 'data[last_name]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('phone', 'text', array('label' => $this->__('Phone:'), 'name' => 'data[phone]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('password', 'password', array('label' => $this->__('Password:'), 'name' => 'data[password]', 'required' => true, 'class' => 'required-entry'));
     $fieldset->addField('store_id', 'select', array('name' => 'data[store_id]', 'label' => $this->__('Sync Remarkety with this view:'), 'required' => true, 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false)));
     $fieldset->addField('terms', 'checkbox', array('label' => false, 'name' => 'data[terms]', 'checked' => false, 'value' => '1', 'class' => 'required-entry', 'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#')));
     $fieldset->addField('create', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Create New Account And Connect') . '</span></span></button>'));
     //         $fieldset->addField('login', 'note', array(
     //             'label' => false,
     //             'name' => 'button',
     //             'after_element_html' => '<button type="button" class="save"
     //             onclick="window.location = \'' . $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_LOGIN)) . '\'"
     //             ><span><span>'
     //                 . $this->__('I Already Have An Account') . '</span></span></button>',
     //         ));
     return parent::_prepareForm();
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:38,代码来源:Form.php

示例2: _prepareForm

 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/install/complete'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Upgrade Remarkety extension')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'upgrade'));
     $instruction = $fieldset->addField('instruction', 'note', array('text' => '', 'label' => false, 'after_element_html' => '<p style="font-weight:bold;">' . $this->__('Thank you for installing the Remarkety Magento plugin.
             You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!') . '<br><br>' . $this->__('It seems that you have already installed Remarkety on this website before. This
             version of the plugin will create a new API key, and automatically inform
             Remarkety. If this is a mistake, please <a href="%s">click here</a>.</p>', $this->getUrl('*/install/install', array('mode' => 'install_create')))));
     $instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
     $fieldset->addField('button', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Complete Installation') . '</span></span></button>'));
     return parent::_prepareForm();
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:21,代码来源:Form.php

示例3: _prepareForm

 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getUrl('*/queue/save'), 'method' => 'post'));
     $form->setFieldContainerIdPrefix('data');
     $form->setUseContainer(true);
     $this->setForm($form);
     $fieldset = $form->addFieldset('general', array('legend' => $this->__('Remarkety Configuration')));
     $fieldset->addField('mode', 'hidden', array('name' => 'data[mode]', 'value' => 'configuration'));
     $fieldset->addField('intervals', 'text', array('label' => $this->__('Intervals:'), 'name' => 'data[intervals]', 'required' => true, 'after_element_html' => '<small style="float:left;width:100%;">' . $this->__('This defines the queue retry interval.<br/>
         		Type the amount of minutes between retries, separated by commas. For example "1,3,10" -
                 the second attempt will be after 1 minute, third after 3 minutes,<br/>
                 and fourth after 10 minutes. If the last attempt is unsuccessful,
                 the status will be changed to "failed" and will not be retried anymore.') . '</small>', 'value' => Mage::getStoreConfig('remarkety/mgconnector/intervals'), 'style' => 'float:left'));
     $button = $fieldset->addField('button', 'note', array('label' => false, 'name' => 'button', 'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>' . $this->__('Save') . '</span></span></button>'));
     $button->getRenderer()->setTemplate('mgconnector/element.phtml');
     return parent::_prepareForm();
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:22,代码来源:Form.php


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