本文整理匯總了PHP中Varien_Data_Form_Element_Select::getElementHtml方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form_Element_Select::getElementHtml方法的具體用法?PHP Varien_Data_Form_Element_Select::getElementHtml怎麽用?PHP Varien_Data_Form_Element_Select::getElementHtml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Varien_Data_Form_Element_Select
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Select::getElementHtml方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getElementHtml
/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
if (is_null($this->getValue())) {
$this->setValue(Enterprise_Rma_Model_Product_Source::ATTRIBUTE_ENABLE_RMA_USE_CONFIG);
}
return parent::getElementHtml();
}
示例2: getElementHtml
/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
if (is_null($this->getValue())) {
$this->setValue(Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type_Enabled::MSRP_ENABLE_USE_CONFIG);
}
return parent::getElementHtml();
}
示例3: getElementHtml
/**
* Get element html
*/
public function getElementHtml()
{
$html = parent::getElementHtml();
$html .= '<br/>
<div id="nwdthemes_gfont_preview' . $this->getHtmlId() . '" class="nwdthemes_gfont_preview" style="font-size:20px; margin-top:5px;">The quick brown fox jumps over the lazy dog</div>
<script type="text/javascript">new gFontPreview("' . $this->getHtmlId() . '");</script>';
return $html;
}
示例4: _renderCellTemplate
/**
* Render array cell for prototypeJS template
*
* @param string $columnName
* @return string
*/
protected function _renderCellTemplate($columnName)
{
if ($columnName == 'value' && isset($this->_columns[$columnName])) {
$element = new Varien_Data_Form_Element_Select();
$element->setForm($this->getForm())->setName($this->_getCellInputElementName($columnName))->setHtmlId($this->_getCellInputElementId('#{_id}', $columnName))->setValues(Mage::getModel('Mage_Core_Model_Design_Source_Design')->getAllOptions(false));
return str_replace("\n", '', $element->getElementHtml());
}
return parent::_renderCellTemplate($columnName);
}
示例5: _toHtml
/**
* @return string
*/
protected function _toHtml()
{
$htmlId = $this->getColumnName() . '#{_id}';
$select = new Varien_Data_Form_Element_Select(array('html_id' => $htmlId, 'no_span' => TRUE, 'name' => $this->getInputName()));
$select->addData($this->getColumn());
$select->setForm(new Varien_Object());
$select->setValues($this->getValues());
// Escape properly and use javascript to set the selected values
return str_replace(array("\n", '"', '/'), array('', '\\"', '\\/'), "\n {$select->getElementHtml()}\n <script type=\"text\\/javascript\">\n \$(\"{$htmlId}\").setValue(\"#{{$this->getColumnName()}}\");\n </script>\n ");
}
示例6: getElementHtml
public function getElementHtml()
{
if (Mage::getStoreConfigFlag('udropship/vendor/autocomplete_htmlselect')) {
$html = '<input id="_autocomplete_' . $this->getHtmlId() . '" class="input-text" name="_autocomplete_' . $this->getName() . '" value="' . $this->getEscapedNameValue() . '" ' . $this->serialize($this->getHtmlAttributes()) . '/>' . "\n";
$html .= '
<input type="hidden" name="' . $this->getName() . '" id="' . $this->getHtmlId() . '" value="' . $this->getEscapedValue() . '">
<div class="autocomplete" style="font-weight:bold; display: none;" id="_autocomplete_container_' . $this->getHtmlId() . '"></div>
<script type="text/javascript">
(function () {
var acObserve = function(){
if ($("_autocomplete_' . $this->getHtmlId() . '").value=="") $("' . $this->getHtmlId() . '").value = ""
}
$("_autocomplete_' . $this->getHtmlId() . '").observe("change", acObserve)
$("_autocomplete_' . $this->getHtmlId() . '").observe("click", acObserve)
new Ajax.Autocompleter(
"_autocomplete_' . $this->getHtmlId() . '",
"_autocomplete_container_' . $this->getHtmlId() . '",
"' . Mage::getModel('core/url')->getUrl('udropship/index/vendorAutocomplete') . '",
{
paramName: "vendor_name",
method: "get",
minChars: 2,
updateElement: function(el) {
$("' . $this->getHtmlId() . '").value = el.title;
$("_autocomplete_' . $this->getHtmlId() . '").value = el.innerHTML.stripTags();
},
onShow : function(element, update) {
if(!update.style.position || update.style.position=="absolute") {
update.style.position = "absolute";
Position.clone(element, update, {
setHeight: false,
offsetTop: element.offsetHeight
});
}
Effect.Appear(update,{duration:0});
}
}
)
})()
</script>
';
$html .= $this->getAfterElementHtml();
} else {
$html = parent::getElementHtml();
}
return $html;
}
示例7: getElementHtml
/**
* Retrieve element html
*
* @return string
*/
public function getElementHtml()
{
$value = $this->getValue();
if ($value == '') {
$this->setValue($this->_getValueFromConfig());
}
$html = parent::getElementHtml();
$htmlId = 'use_config_' . $this->getHtmlId();
$checked = $value == '' ? ' checked="checked"' : '';
$disabled = $this->getReadonly() ? ' disabled="disabled"' : '';
$html .= '<input id="' . $htmlId . '" name="product[' . $htmlId . ']" ' . $disabled . ' value="1" ' . $checked;
$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
$html .= ' <label for="' . $htmlId . '">' . Mage::helper('adminhtml')->__('Use Config Settings') . '</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId . '\').parentNode);</script>';
return $html;
}
示例8: getElementHtml
/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
$disabled = false;
if (!$this->getValue()) {
$this->setData('disabled', 'disabled');
$disabled = true;
}
$html = parent::getElementHtml();
$htmlId = 'use_config_' . $this->getHtmlId();
$html .= '<input id="' . $htmlId . '" value="1"';
$html .= $disabled ? ' checked="checked"' : '';
$html .= 'onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox">';
$html .= ' <label for="' . $htmlId . '" class="normal">' . AO::helper('adminhtml')->__('Use Config Settings') . '</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId . '\').parentNode);</script>';
return $html;
}
示例9: getElementHtml
/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
$elementDisabled = $this->getDisabled() == 'disabled';
$disabled = false;
if (!$this->getValue() || $elementDisabled) {
$this->setData('disabled', 'disabled');
$disabled = true;
}
$html = parent::getElementHtml();
$htmlId = 'use_config_' . $this->getHtmlId();
$html .= '<input id="' . $htmlId . '" name="use_config[]" value="' . $this->getId() . '"';
$html .= $disabled ? ' checked="checked"' : '';
if ($this->getReadonly() || $elementDisabled) {
$html .= ' disabled="disabled"';
}
$html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
$html .= ' <label for="' . $htmlId . '" class="normal">' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('Use Config Settings') . '</label>';
$html .= '<script type="text/javascript">toggleValueElements($(\'' . $htmlId . '\'), $(\'' . $htmlId . '\').parentNode);</script>';
return $html;
}
示例10: getElementHtml
/**
* Join quantity and in stock elements' html
*
* @return string
*/
public function getElementHtml()
{
$this->_disableFields();
return $this->_qty->getElementHtml() . parent::getElementHtml() . $this->_getJs(self::QUANTITY_FIELD_HTML_ID, $this->getId());
}
示例11: getFormattersHtml
public function getFormattersHtml($name, $value = null)
{
$element = new Varien_Data_Form_Element_Select();
$element->setForm(new Varien_Object())->setValue($value)->setName($name)->setValues(array('' => Mage::helper('rule')->__('Default'), 'intval' => Mage::helper('rule')->__('Integer'), 'price' => Mage::helper('rule')->__('Price'), 'strip_tags' => Mage::helper('rule')->__('Strip Tags')));
return $element->getElementHtml();
}
示例12: _getSelect
protected function _getSelect($name, $value, $extra, $values)
{
$element = new Varien_Data_Form_Element_Select();
$element->setForm(new Varien_Object())->setValue($value)->setName($name)->addData($extra)->setValues($values);
return $element->getElementHtml();
}
示例13: getElementHtml
public function getElementHtml()
{
$this->_data['disabled'] = Mage::helper('advancedreports/setup')->isDefault($this->getId());
return parent::getElementHtml() . $this->_getDefaultCheckbox();
}
示例14: getElementHtml
public function getElementHtml()
{
$this->setValues(array('No', 'Yes'));
return parent::getElementHtml();
}
示例15: getElementHtml
/**
* Retrieve Element HTML fragment
*
* @return string
*/
public function getElementHtml()
{
$this->setData('after_element_html', sprintf('<script>new categoryAttributeDependency("%s");</script>', $this->getHtmlId()));
return parent::getElementHtml();
}