本文整理汇总了PHP中VmHtml类的典型用法代码示例。如果您正苦于以下问题:PHP VmHtml类的具体用法?PHP VmHtml怎么用?PHP VmHtml使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VmHtml类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
protected function getInput()
{
VmConfig::loadConfig();
VmConfig::loadJLang('com_virtuemart');
if (!is_array($this->value)) {
$this->value = array($this->value);
}
$categorylist = ShopFunctions::categoryListTree($this->value);
$name = $this->name;
if ($this->multiple) {
$name = $this->name;
$this->multiple = ' multiple="multiple" ';
}
$id = VmHtml::ensureUniqueId('vmcategories');
$html = '<select id="' . $id . '" class="inputbox" name="' . $name . '" ' . $this->multiple . ' >';
if (!$this->multiple) {
$html .= '<option value="0">' . vmText::_('COM_VIRTUEMART_CATEGORY_FORM_TOP_LEVEL') . '</option>';
}
$html .= $categorylist;
$html .= "</select>";
return $html;
}
示例2: list_option
public static function list_option($name, $options, $list_selected = array(), $attrib = "onchange='submit();'", $key = 'value', $text = 'text', $zero = true, $tranlsate = true)
{
$doc = JFactory::getDocument();
$doc->addScript(JUri::root() . '/media/system/js/jQuery-Plugin-For-Bootstrap-Button-Group-Toggles/select-toggleizer.js');
ob_start();
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('select[name="<?php
echo $name;
?>
"]').toggleize({});
});
</script>
<?php
$js_content = ob_get_clean();
$js_content = TSMUtility::remove_string_javascript($js_content);
$doc->addScriptDeclaration($js_content);
$attrib .= ' disable_chosen="true" ';
$html = VmHtml::genericlist($options, $name, $attrib, $key, $text, $list_selected, false, $tranlsate);
return $html;
}
示例3: renderMetaEdit
public static function renderMetaEdit($obj)
{
$options = array('' => vmText::_('JGLOBAL_INDEX_FOLLOW'), 'noindex, follow' => vmText::_('JGLOBAL_NOINDEX_FOLLOW'), 'index, nofollow' => vmText::_('JGLOBAL_INDEX_NOFOLLOW'), 'noindex, nofollow' => vmText::_('JGLOBAL_NOINDEX_NOFOLLOW'), 'noodp, noydir' => vmText::_('COM_VIRTUEMART_NOODP_NOYDIR'), 'noodp, noydir, nofollow' => vmText::_('COM_VIRTUEMART_NOODP_NOYDIR_NOFOLLOW'));
$html = '<table>
' . VmHTML::row('input', 'COM_VIRTUEMART_CUSTOM_PAGE_TITLE', 'customtitle', $obj->customtitle) . '
' . VmHTML::row('textarea', 'COM_VIRTUEMART_METAKEY', 'metakey', $obj->metakey, 'class="inputbox"', 80) . '
' . VmHTML::row('textarea', 'COM_VIRTUEMART_METADESC', 'metadesc', $obj->metadesc, 'class="inputbox"', 80) . '
' . VmHtml::row('selectList', 'COM_VIRTUEMART_METAROBOTS', 'metarobot', $obj->metarobot, $options) . '
' . VmHTML::row('input', 'COM_VIRTUEMART_METAAUTHOR', 'metaauthor', $obj->metaauthor) . '
</table>';
return $html;
}
示例4:
vmJsApi::popup('#full-tos', '#terms-of-service');
if (!class_exists('VirtueMartCart')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
}
$cart = VirtuemartCart::getCart();
$cart->prepareVendor();
if (empty($tos) and !VmConfig::get('agree_to_tos_onorder', true)) {
if (is_array($cart->BT) and !empty($cart->BT['tos'])) {
$tos = $cart->BT['tos'];
}
}
}
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
echo VmHtml::checkbox($_prefix . $field['name'], $tos, 1, 0, 'class="terms-of-service required"', 'tos');
if (VmConfig::get('oncheckout_show_legal_info', 1) and $app->isSite()) {
?>
<div class="terms-of-service">
<label for="tos">
<a href="<?php
echo JRoute::_('index.php?option=com_virtuemart&view=vendor&layout=tos&virtuemart_vendor_id=1', FALSE);
?>
" class="terms-of-service" id="terms-of-service" rel="facebox"
target="_blank">
<span class="vmicon vm2-termsofservice-icon"></span>
<?php
echo vmText::_('COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED');
?>
</a>
</label>
示例5: jDate
static function jDate($date = '', $name = "date", $id = NULL, $resetBt = TRUE, $yearRange = '')
{
if ($yearRange) {
$yearRange = 'yearRange: "' . $yearRange . '",';
}
$test = (int) str_replace(array('-', ' ', ':'), '', $date);
if (empty($test)) {
$date = 0;
}
if (empty($id)) {
$id = str_replace(array('[]', '[', ']'), '.', $name);
$id = str_replace('..', '.', $id);
}
static $jDate;
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$id = VmHtml::ensureUniqueId($id);
$dateFormat = vmText::_('COM_VIRTUEMART_DATE_FORMAT_INPUT_J16');
//="m/d/y"
$search = array('m', 'd', 'Y');
$replace = array('mm', 'dd', 'yy');
$jsDateFormat = str_replace($search, $replace, $dateFormat);
if ($date) {
$formatedDate = JHtml::_('date', $date, $dateFormat);
} else {
$formatedDate = vmText::_('COM_VIRTUEMART_NEVER');
}
$display = '<input class="datepicker-db" id="' . $id . '" type="hidden" name="' . $name . '" value="' . $date . '" />';
$display .= '<input id="' . $id . '_text" class="datepicker" type="text" value="' . $formatedDate . '" />';
if ($resetBt) {
$display .= '<span class="vmicon vmicon-16-logout icon-nofloat js-date-reset"></span>';
}
// If exist exit
if ($jDate) {
return $display;
}
self::addJScript('datepicker', '
jQuery(document).ready( function($) {
jQuery(document).on( "focus",".datepicker", function() {
jQuery( this ).datepicker({
changeMonth: true,
changeYear: true,
' . $yearRange . '
dateFormat:"' . $jsDateFormat . '",
altField: $(this).prev(),
altFormat: "yy-mm-dd"
});
});
jQuery(document).on( "click",".js-date-reset", function() {
jQuery(this).prev("input").val("' . vmText::_('COM_VIRTUEMART_NEVER') . '").prev("input").val("0");
});
});
');
vmJsApi::css('ui/jquery.ui.all');
$lg = JFactory::getLanguage();
$lang = $lg->getTag();
$vlePath = vmJsApi::setPath('i18n/jquery.ui.datepicker-' . $lang, FALSE, '', $minified = NULL, 'js', true);
if (!file_exists($vlePath) or is_dir($vlePath)) {
$lang = 'en-GB';
}
vmJsApi::addJScript('i18n/jquery.ui.datepicker-' . $lang);
$jDate = TRUE;
return $display;
}
示例6: array
class="hasTip"
title="<?php
echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_CALCULATE_PRICE_FINAL_TIP');
?>
">
<?php
echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_CALCULATE_PRICE_FINAL');
?>
</span>
</strong>
<br />
<?php
// echo VmHtml::checkbox('override',$this->product->override);
$options = array(0 => vmText::_('COM_VIRTUEMART_DISABLED'), 1 => vmText::_('COM_VIRTUEMART_OVERWRITE_FINAL'), -1 => vmText::_('COM_VIRTUEMART_OVERWRITE_PRICE_TAX'));
echo VmHtml::radioList('mprices[override][' . $this->priceCounter . ']', $this->product->allPrices[$this->product->selectedPrice]['override'], $options, '', ' ');
?>
</td>
<td style="background: #d5d5d5;padding:0;width:1px;"></td>
<td>
<div style="font-weight: bold;">
<?php
echo vmText::_('COM_VIRTUEMART_PRODUCT_PRICE_QUANTITY_RANGE');
?>
</div>
<input type="text"
size="12"
style="text-align:right;" name="mprices[price_quantity_start][]"
value="<?php
echo $this->product->allPrices[$this->product->selectedPrice]['price_quantity_start'];
?>
示例7:
?>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h3 class="build-your-room"><?php
echo JText::_('Build your room');
?>
</h3>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
echo VmHtml::build_room(array(), "build_room", "", $privategrouptrip, $passenger_config);
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="pull-right">
<button type="submit" class="btn btn-primary btn-large control-next "><span title="" class="icon-next "></span><?php
echo JText::_('Next');
?>
</button>
</div>
</div>
</div>
示例8:
?>
<?php
// Continue and Checkout Button
?>
<div class="checkout-button-top">
<?php
// Terms Of Service Checkbox
JLoader::register('VmModel', JPATH_VM_ADMINISTRATOR . '/helpers/vmmodel.php');
$userFieldsModel = VmModel::getModel('userfields');
if ($userFieldsModel->getIfRequired('agreed')) {
JLoader::register('VmHtml', JPATH_VM_ADMINISTRATOR . '/helpers/html.php');
echo VmHtml::checkbox('tosAccepted', $this->cart->tosAccepted, 1, 0, 'class="terms-of-service"');
if (VmConfig::get('oncheckout_show_legal_info', 1)) {
?>
<div class="terms-of-service">
<label for="tosAccepted">
<a href="<?php
JRoute::_('index.php?option=com_virtuemart&view=vendor&layout=tos&virtuemart_vendor_id=1', FALSE);
?>
" class="terms-of-service" id="terms-of-service" rel="facebox"
target="_blank">
<span class="vmicon vm2-termsofservice-icon"></span>
<?php
echo JText::_('COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED');
?>
</a>
示例9:
?>
<span class="price">$US 780</span></div>
<div class="span4"><?php
echo JText::_('Balance');
?>
<span class="price">$US 780</span></div>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
echo VmHtml::build_payment_cardit_card('payment', $total_price, 300);
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="pull-right">
<button type="submit" class="btn btn-primary btn-large control-pay-now "><span title="" class="icon-next "></span><?php
echo JText::_('Pay now');
?>
</button>
</div>
</div>
示例10: foreach
foreach ($this->userFieldsCart["fields"] as $field) {
if ($field['name'] == 'tos') {
$tosenabled = true;
}
}
if ($tosenabled) {
?>
<section title=".squaredTwo">
<div class="squaredTwo">
<?php
if ($params->get('check_terms')) {
$checked = 1;
} else {
$checked = 0;
}
echo VmHtml::checkbox('tos', $checked, 1, 0, 'class="terms-of-service" id="squaredTwo"');
?>
<label for="squaredTwo"></label>
</div>
</section>
<a class="opg-link opg-text-small" style="cursor:pointer;" data-opg-modal="{target:'#full-tos'}"><?php
echo JText::_('COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED');
?>
</a>
<?php
}
$showextraterms = $params->get('show_extraterms', 0);
if ($showextraterms) {
?>
<div id="privcacy_div" class="opg-width-1-1 opg-margin-small">
示例11: getLimitBox
function getLimitBox($sequence = 0)
{
$app = JFactory::getApplication();
// Initialize variables
$limits = array();
$selected = $this->limit;
// Build the select list
if ($app->isAdmin()) {
if (empty($sequence)) {
$sequence = VmConfig::get('pagseq', 0);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', $items);
}
}
}
if (empty($limits)) {
$limits[15] = JHtml::_('select.option', 15);
$limits[30] = JHtml::_('select.option', 30);
$limits[50] = JHtml::_('select.option', 50);
$limits[100] = JHtml::_('select.option', 100);
$limits[200] = JHtml::_('select.option', 200);
$limits[400] = JHtml::_('select.option', 400);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', $this->limit);
ksort($limits);
}
$namespace = 'Joomla.';
$id = VmHtml::ensureUniqueId('limit');
$html = JHtml::_('select.genericlist', $limits, 'limit', 'class="inputbox" size="1" onchange="' . $namespace . 'submitform();"', 'value', 'text', $selected, $id);
} else {
$getArray = vRequest::getGet();
$link = '';
unset($getArray['limit']);
foreach ($getArray as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$link .= '&' . urlencode($key) . '[' . urlencode($k) . ']' . '=' . urlencode($v);
}
} else {
$link .= '&' . urlencode($key) . '=' . urlencode($value);
}
}
$link = 'index.php?' . ltrim($link, '&');
if (empty($sequence)) {
$sequence = VmConfig::get('pagseq_' . $this->_perRow);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $items, false), $items);
}
}
}
if (empty($limits) or !is_array($limits)) {
if ($this->_perRow === 1) {
$this->_perRow = 5;
}
$limits[$this->_perRow * 5] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 5, false), $this->_perRow * 5);
$limits[$this->_perRow * 10] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 10, false), $this->_perRow * 10);
$limits[$this->_perRow * 20] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 20, false), $this->_perRow * 20);
$limits[$this->_perRow * 50] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 50, false), $this->_perRow * 50);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->limit, false), $this->limit);
ksort($limits);
}
$selected = JRoute::_($link . '&limit=' . $selected, false);
$js = 'onchange="window.top.location.href=this.options[this.selectedIndex].value"';
$id = VmHtml::ensureUniqueId('limit');
$html = JHtml::_('select.genericlist', $limits, '', 'class="inputbox" size="1" ' . $js, 'value', 'text', $selected, $id);
}
return $html;
}
示例12:
require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
}
$cart = VirtuemartCart::getCart();
$cart->prepareVendor();
if (is_array($cart->BT) and !empty($cart->BT['tos'])) {
$tos = $cart->BT['tos'];
} else {
$tos = 0;
}
} else {
$tos = $field['value'];
}
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
echo VmHtml::checkbox($_prefix . $field['name'], $tos, 1, 0, 'class="terms-of-service" id="tos"');
if (VmConfig::get('oncheckout_show_legal_info', 1) and $app->isSite()) {
?>
<div class="terms-of-service-wrapper">
<label for="tos">
<a href="<?php
echo JRoute::_('index.php?option=com_virtuemart&view=vendor&layout=tos&virtuemart_vendor_id=1', FALSE);
?>
" class="terms-of-service" id="terms-of-service" rel="facebox"
target="_blank">
<span class="icon-list"></span>
<?php
echo vmText::_('COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED');
?>
</a>
示例13:
</div>
</div>
<div class="joint_group_note joint_group_note_2">
<div class="row-fluid">
<div class="span12">
<?php
echo $this->lipsum->words(50);
?>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
echo VmHtml::build_excursion_addon(array(), "build_excursion_addon", "", $privategrouptrip, $passenger_config, $this->list_excursion_addon);
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="pull-right">
<button type="submit" class="btn btn-primary btn-large control-skip "><span title=""
class="icon-next "></span><?php
echo JText::_('Skip');
?>
</button>
<button type="submit" class="btn btn-primary btn-large control-next "><span title=""
示例14:
<div class="row-fluid">
<div class="span12">
<h3 class="pull-right build-your-room"><?php
echo JText::_('Service total');
?>
</h3>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<?php
echo VmHtml::build_passenger_summary_confirm(array(), "passenger_summary", "", $privategrouptrip, $passenger_config, $this->product);
?>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="payment-overview">
<h4><?php
echo JText::_('Tour fee summary');
?>
</h4>
<div class="row-fluid">
<div class="span4"><?php
echo JText::_('Total fee');
?>
示例15:
$checkValue = $customfield->override;
}
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_OVERRIDE', $checkValue);
if ($customfield->disabler != 0) {
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_DISABLED', $checkValue);
}
if ($customfield->override != 0) {
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_OVERRIDE', $checkValue);
}
} else {
if ($customfield->virtuemart_product_id == $this->product->product_parent_id) {
$titel = vmText::_('COM_VIRTUEMART_CUSTOM_INHERITED') . '<br/>';
}
}
if (!empty($titel)) {
$text = '<span style="white-space: nowrap;" > d:' . VmHtml::checkbox('field[' . $i . '][disabler]', $customfield->disabler, $checkValue) . ' o:' . VmHtml::checkbox('field[' . $i . '][override]</span>', $customfield->override, $checkValue);
}
$tables['fields'] .= '<tr class="removable">
<td><span >' . $titel . $text . '<br />' . vmText::_($customfield->custom_title) . '</span></td>
<td>' . $customfield->display . '</td>
<td>
<span class="vmicon vmicon-16-' . $cartIcone . '"></span>' . vmText::_($this->fieldTypes[$customfield->field_type]) . VirtueMartModelCustomfields::setEditCustomHidden($customfield, $i) . '</td>
<td><span class="vmicon vmicon-16-move"></span>
<span class="vmicon vmicon-16-remove"></span>' . '</td>
</tr>';
}
$i++;
}
}
$emptyTable = '
<tr>