本文整理汇总了PHP中VmHtml::checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP VmHtml::checkbox方法的具体用法?PHP VmHtml::checkbox怎么用?PHP VmHtml::checkbox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VmHtml
的用法示例。
在下文中一共展示了VmHtml::checkbox方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div id="header">
<div id="filterbox">
<table>
<tr>
<td align="left" width="100%">
<?php
echo $this->displayDefaultViewSearch('COM_VIRTUEMART_NAME', 'searchMedia') . ' ' . $this->lists['search_type'] . ' ' . $this->lists['search_role'];
?>
</td>
<td>
<?php
echo VmHtml::checkbox('missing', 'missing');
?>
</td>
</tr>
</table>
</div>
<div id="resultscounter"><?php
echo $this->pagination->getResultsCounter();
?>
</div>
</div>
<?php
$productfileslist = $this->files;
//$roles = $this->productfilesroles;
?>
示例2:
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>
示例3: displayFileHandler
/**
* This displays a media handler. It displays the full and the thumb (icon) of the media.
* It also gives a possibility to upload/change/thumbnail media
*
* @param string $imageArgs html atttributes, Just for displaying the fullsized image
*/
public function displayFileHandler()
{
VmConfig::loadJLang('com_virtuemart_media');
$this->addHiddenByType();
$html = '<fieldset class="checkboxes">';
$html .= '<legend>' . vmText::_('COM_VIRTUEMART_IMAGE_INFORMATION') . '</legend>';
$html .= '<div class="vm__img_autocrop">';
$imageArgs = array('id' => 'vm_display_image');
$html .= $this->displayMediaFull($imageArgs, false, '', false) . '</div>';
//This makes problems, when there is already a form, and there would be form in a form. breaks js in some browsers
// $html .= '<form name="adminForm" id="adminForm" method="post" enctype="multipart/form-data">';
$html .= ' <table class="adminform"> ';
if ($this->published || $this->virtuemart_media_id === 0) {
$checked = 1;
} else {
$checked = 0;
}
$html .= '<tr>';
// The following was removed bacause the check box (publish/unpublish) was not functioning...
// $this->media_published = $this->published;
$html .= '<td class="labelcell" style="width:20em">
<label for="published">' . vmText::_('COM_VIRTUEMART_FILES_FORM_FILE_PUBLISHED') . '</label>
</td>
<td>';
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$html .= VmHtml::checkbox('media[media_published]', $checked, 1, 0, 'class="inputbox"', 'media[media_published]');
//<input type="checkbox" class="inputbox" id="media_published'.$identify.'" name="media_published'.$identify.'" '.$checked.' size="16" value="1" />
$html .= '</td>';
$imgWidth = VmConfig::get('img_width', '');
if (!empty($imgWidth)) {
$imgWidth = 'width:' . VmConfig::get('img_width', 90) . 'px;';
} else {
$imgWidth = 'max-width:200px;width:auto;';
}
$imgHeight = VmConfig::get('img_height', '');
if (!empty($imgHeight)) {
$imgHeight = 'height:' . VmConfig::get('img_height', 90) . 'px;';
} else {
$imgHeight = '';
}
$html .= '<td rowspan = "8" min-width = "' . (VmConfig::get('img_width', 90) + 10) . 'px" overflow="hidden">';
$thumbArgs = array('class' => 'vm_thumb_image', 'style' => 'overflow: auto;' . $imgWidth . $imgHeight);
$html .= $this->displayMediaThumb($thumbArgs);
//JHTML::image($this->file_url_thumb, 'thumbnail', 'id="vm_thumb_image" style="overflow: auto; float: right;"');
// $html .= $this->displayMediaThumb('',false,'id="vm_thumb_image" style="overflow: auto; float: right;"');
$html .= '</td>';
$html .= '</tr>';
if (vmAccess::manager('media')) {
$readonly = 'readonly';
} else {
$readonly = '';
}
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_TITLE', 'file_title');
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_DESCRIPTION', 'file_description');
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_META', 'file_meta');
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_CLASS', 'file_class');
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_URL', 'file_url', $readonly);
//remove the file_url_thumb in case it is standard
if (!empty($this->file_url_thumb) and is_a($this, 'VmImage')) {
$file_url_thumb = $this->createThumbFileUrl();
//vmdebug('my displayFileHandler ',$this,$file_url_thumb);
if ($this->file_url_thumb == $file_url_thumb) {
$this->file_url_thumb = vmText::sprintf('COM_VIRTUEMART_DEFAULT_URL', $file_url_thumb);
}
}
$html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_URL_THUMB', 'file_url_thumb', $readonly);
$this->addMediaAttributesByType();
$html .= '<tr>
<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_ROLE') . '</td>
<td><fieldset class="checkboxes">' . JHtml::_('select.radiolist', $this->getOptions($this->_mRoles), 'media[media_roles]', '', 'value', 'text', $this->media_role) . '</fieldset></td></tr>';
// $html .= '<tr><td class="labelcell">'.VmHTML::checkbox('file_is_forSale', $this->file_is_forSale);
// $html .= VmHTML::checkbox('file_is_downloadable', $this->file_is_downloadable);
if (!empty($this->file_type)) {
$html .= '<tr>
<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
<td><fieldset class="checkboxes">' . vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_' . strtoupper($this->file_type)) . '</fieldset></td></tr>';
} else {
$mediaattribtemp = $this->media_attributes;
if (empty($this->media_attributes)) {
$mediaattribtemp = 'product';
}
$html .= '<tr>
<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
<td><fieldset class="checkboxes">' . JHtml::_('select.radiolist', $this->getOptions($this->_mLocation), 'media[media_attributes]', '', 'value', 'text', $mediaattribtemp) . '</fieldset></td></tr>';
}
// select language for image
$active_languages = VmConfig::get('active_languages');
if (count($active_languages) > 1) {
$selectedImageLangue = explode(",", $this->file_lang);
$configM = VmModel::getModel('config');
$languages = $configM->getActiveLanguages($selectedImageLangue, 'media[active_languages][]');
$html .= '<tr>
//.........这里部分代码省略.........
示例4: foreach
<span><span class="vmicon vm2-shipto-icon"></span>
<?php
echo tsmText::_('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL');
?>
</span>
<?php
// Output Bill To Address
?>
<div class="output-shipto">
<?php
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
if ($this->cart->user->virtuemart_user_id == 0) {
echo tsmText::_('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
echo VmHtml::checkbox('STsameAsBT', $this->cart->STsameAsBT, 1, 0, 'id="STsameAsBTjs" data-dynamic-update=1') . '<br />';
} else {
if (!empty($this->cart->lists['shipTo'])) {
echo $this->cart->lists['shipTo'];
}
}
if (empty($this->cart->STsameAsBT) and !empty($this->cart->ST) and !empty($this->cart->STaddress['fields'])) {
?>
<div id="output-shipto-display">
<?php
foreach ($this->cart->STaddress['fields'] as $item) {
if (!empty($item['value'])) {
?>
<!-- <span class="titles"><?php
echo $item['title'];
?>
示例5: foreach
echo JText::_('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL');
?>
</span>
<?php
// Output Bill To Address
?>
<div class="output-shipto">
<?php
if (empty($this->cart->STaddress['fields'])) {
echo JText::sprintf('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_EXPLAIN', JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'));
} else {
if (!class_exists('VmHtml')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
echo JText::_('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
echo VmHtml::checkbox('STsameAsBTjs', $this->cart->STsameAsBT) . '<br />';
?>
<div id="output-shipto-display">
<?php
foreach ($this->cart->STaddress['fields'] as $item) {
if (!empty($item['value'])) {
?>
<!-- <span class="titles"><?php
echo $item['title'];
?>
</span> -->
<?php
if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') {
?>
<span class="values<?php
echo '-' . $item['name'];
示例6:
?>
<?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>
示例7: htmlentities
}
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_OVERRIDE', $checkValue) . '</br>';
if ($customfield->disabler != 0) {
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_DISABLED', $checkValue) . '</br>';
}
if ($customfield->override != 0) {
$titel = vmText::sprintf('COM_VIRTUEMART_CUSTOM_OVERRIDE', $checkValue) . '</br>';
}
} 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;" class="hasTip" title="' . htmlentities(vmText::_('COM_VIRTUEMART_CUSTOMFLD_DIS_DER_TIP')) . '">d:' . VmHtml::checkbox('field[' . $i . '][disabler]', $customfield->disabler, $checkValue) . '</span>
<span style="white-space: nowrap;" class="hasTip" title="' . htmlentities(vmText::_('COM_VIRTUEMART_DIS_DER_CUSTOMFLD_OVERR_DER_TIP')) . '">o:' . VmHtml::checkbox('field[' . $i . '][override]', $customfield->override, $checkValue) . '</span>';
}
$tables['fields'] .= '<tr class="removable">
<td >
<b>' . vmText::_($type) . '</b> ' . vmText::_($customfield->custom_title) . '</span><br/>
' . $titel . ' ' . $text . '
<span class="vmicon vmicon-16-' . $cartIcone . '"></span>
<span class="vmicon vmicon-16-move"></span>
<span class="vmicon vmicon-16-remove"></span>
' . VirtueMartModelCustomfields::setEditCustomHidden($customfield, $i) . '</td>
<td ' . $colspan . '>' . $customfield->display . '</td>
</tr>';
}
$i++;
}
示例8:
$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';
}
$class = 'terms-of-service';
if (!empty($field['required'])) {
$class .= ' required';
}
echo VmHtml::checkbox($_prefix . $field['name'], $tos, 1, 0, 'class="' . $class . '"', 'tos');
if ($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>
示例9: foreach
<span><span class="vmicon vm2-shipto-icon"></span>
<?php
echo vmText::_('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL');
?>
</span>
<?php
// Output Bill To Address
?>
<div class="output-shipto">
<?php
if (!class_exists('VmHtml')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
if ($this->cart->user->virtuemart_user_id == 0) {
echo vmText::_('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
echo VmHtml::checkbox('STsameAsBT', $this->cart->STsameAsBT, 1, 0, 'id="STsameAsBTjs"') . '<br />';
} else {
if (!empty($this->cart->lists['shipTo'])) {
echo $this->cart->lists['shipTo'];
}
}
if (empty($this->cart->STsameAsBT) and !empty($this->cart->ST) and !empty($this->cart->STaddress['fields'])) {
?>
<div id="output-shipto-display">
<?php
foreach ($this->cart->STaddress['fields'] as $item) {
if (!empty($item['value'])) {
?>
<!-- <span class="titles"><?php
echo $item['title'];
?>
示例10: foreach
<?php
echo JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
?>
</a>
<?php
// Output Bill To Address
?>
<div class="output-shipto">
<?php
if (empty($this->cart->STaddress['fields'])) {
echo JText::sprintf('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_EXPLAIN', JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'));
} else {
if (!class_exists('VmHtml')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
echo JText::_('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT') . VmHtml::checkbox('STsameAsBT', $this->cart->STsameAsBT) . '<br />';
foreach ($this->cart->STaddress['fields'] as $item) {
if (!empty($item['value'])) {
?>
<!-- <span class="titles"><?php
echo $item['title'];
?>
</span> -->
<?php
if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') {
?>
<span class="values<?php
echo '-' . $item['name'];
?>
示例11:
<?php
if (!class_exists('VmHtml')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
if (VmConfig::get('oncheckout_show_legal_info', 1)) {
?>
<section title=".squaredTwo">
<div class="squaredTwo">
<?php
echo VmHtml::checkbox('tos', $this->cart->tos, 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>
<div id="full-tos" class="opg-modal">
<div class="opg-modal-dialog opg-text-left">
<a class="opg-modal-close opg-close"></a>
<strong><?php
echo JText::_('COM_VIRTUEMART_CART_TOS');
?>
示例12: 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">
示例13:
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>
示例14:
$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>