本文整理汇总了PHP中osCommerce\OM\Core\HTML::checkboxField方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::checkboxField方法的具体用法?PHP HTML::checkboxField怎么用?PHP HTML::checkboxField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::checkboxField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: osc_cfg_set_credit_cards_checkbox_field
function osc_cfg_set_credit_cards_checkbox_field($default, $key = null)
{
$OSCOM_PDO = Registry::get('PDO');
$name = empty($key) ? 'configuration_value' : 'configuration[' . $key . '][]';
$cc_array = array();
$Qcc = $OSCOM_PDO->prepare('select id, credit_card_name from :table_credit_cards where credit_card_status = :credit_card_status order by sort_order, credit_card_name');
$Qcc->bindInt(':credit_card_status', 1);
$Qcc->execute();
while ($Qcc->fetch()) {
$cc_array[] = array('id' => $Qcc->valueInt('id'), 'text' => $Qcc->value('credit_card_name'));
}
return HTML::checkboxField($name, $cc_array, explode(',', $default), null, '<br />');
}
示例2: isset
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_telephone_number'), 'telephone', null, ACCOUNT_TELEPHONE > 0) . HTML::inputField('telephone', isset($osC_oiAddress) && $osC_oiAddress->exists('telephone') ? $osC_oiAddress->get('telephone') : null);
?>
</li>
<?php
}
if (ACCOUNT_FAX > -1) {
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_fax_number'), 'fax', null, ACCOUNT_FAX > 0) . HTML::inputField('fax', isset($osC_oiAddress) && $osC_oiAddress->exists('fax') ? $osC_oiAddress->get('fax') : null);
?>
</li>
<?php
}
if ($OSCOM_Customer->hasDefaultAddress() && (isset($_GET['Edit']) && $OSCOM_Customer->getDefaultAddressID() != $_GET['Edit'] || isset($_GET['Create']))) {
?>
<li><?php
echo HTML::checkboxField('primary', array(array('id' => 'on', 'text' => OSCOM::getDef('set_as_primary'))), false);
?>
</li>
<?php
}
?>
</ol>
示例3: sprintf
</div>
</div>
<?php
if (DISPLAY_PRIVACY_CONDITIONS == '1') {
?>
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('create_account_terms_heading');
?>
</h6>
<div class="content">
<?php
echo sprintf(OSCOM::getDef('create_account_terms_description'), OSCOM::getLink(null, 'Info', 'Privacy', 'AUTO')) . '<br /><br /><ol><li>' . HTML::checkboxField('privacy_conditions', array(array('id' => 1, 'text' => OSCOM::getDef('create_account_terms_confirm')))) . '</li></ol>';
?>
</div>
</div>
<?php
}
?>
<div class="submitFormButtons">
<span style="float: right;"><?php
echo HTML::button(array('icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue')));
?>
</span>
</div>
示例4: sprintf
?>
" method="post" onsubmit="return check_form();">
<?php
if (DISPLAY_CONDITIONS_ON_CHECKOUT == '1') {
?>
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('order_conditions_title');
?>
</h6>
<div class="content">
<?php
echo sprintf(OSCOM::getDef('order_conditions_description'), OSCOM::getLink(null, 'Info', 'Conditions', 'AUTO')) . '<br /><br />' . HTML::checkboxField('conditions', array(array('id' => 1, 'text' => OSCOM::getDef('order_conditions_acknowledge'))), false);
?>
</div>
</div>
<?php
}
?>
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('billing_address_title');
?>
</h6>
<div class="content">
示例5:
<?php
if ($new_customer) {
echo '<h3>' . HTML::icon('new.png') . ' ' . OSCOM::getDef('action_heading_new_customer') . '</h3>';
} else {
echo '<h3>' . HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('customers_name') . '</h3>';
}
?>
<fieldset>
<?php
if (ACCOUNT_NEWSLETTER == '1') {
?>
<p><label for="newsletter"><?php
echo OSCOM::getDef('field_newsletter_subscription');
?>
</label><?php
echo HTML::checkboxField('newsletter', null, $new_customer ? null : $OSCOM_ObjectInfo->get('customers_newsletter') == '1');
?>
</p>
<?php
}
?>
</fieldset>
</div>
</div>
示例6:
<p><label for="pattern"><?php
echo OSCOM::getDef('field_pattern');
?>
</label><?php
echo HTML::inputField('pattern', $OSCOM_ObjectInfo->get('pattern'));
?>
</p>
<p><label for="sort_order"><?php
echo OSCOM::getDef('field_sort_order');
?>
</label><?php
echo HTML::inputField('sort_order', $OSCOM_ObjectInfo->get('sort_order'));
?>
</p>
<p><label for="credit_card_status"><?php
echo OSCOM::getDef('field_status');
?>
</label><?php
echo HTML::checkboxField('credit_card_status', '1', $OSCOM_ObjectInfo->get('credit_card_status'));
?>
</p>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
</div>
示例7: testCheckboxField
public function testCheckboxField()
{
$list_array = array(array('id' => 'one', 'text' => 'First'), array('id' => 'two', 'text' => 'Second'), array('id' => 'three', 'text' => 'Third'));
$this->assertEquals('<input type="checkbox" name="selection" id="selection_1" value="one" /><label for="selection1" class="fieldLabel"> First</label> <input type="checkbox" name="selection" id="selection_2" value="two" checked="checked" /><label for="selection2" class="fieldLabel"> Second</label> <input type="checkbox" name="selection" id="selection_3" value="three" /><label for="selection3" class="fieldLabel"> Third</label>', HTML::checkboxField('selection', $list_array, 'two'));
}
示例8:
echo OSCOM::getDef('field_fax_number');
?>
</label><?php
echo HTML::inputField('ab_fax');
?>
</p>
<?php
}
?>
<p><label for="ab_default"><?php
echo OSCOM::getDef('field_set_as_primary');
?>
</label><?php
echo HTML::checkboxField('ab_default');
?>
</p>
</fieldset>
<p id="abSubmitButtonsNew"><?php
echo HTML::button(array('type' => 'button', 'params' => 'onclick="processAddress();"', 'priority' => 'primary', 'icon' => 'plus', 'title' => OSCOM::getDef('button_add'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="cancelAddressForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
<p id="abSubmitButtonsEdit"><?php
echo HTML::button(array('type' => 'button', 'params' => 'data-abButtonType="henrysBucket"', 'priority' => 'primary', 'icon' => 'arrowrefresh-1-n', 'title' => OSCOM::getDef('button_update'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="cancelAddressForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</div>
</div>
示例9: array
<h4><?php echo OSCOM::getDef('subsection_price'); ?></h4>
<fieldset>
<p><label for="variants_price_tax_class"><?php echo OSCOM::getDef('field_tax_class'); ?></label><?php echo HTML::selectMenu('variants_price_tax_class', $OSCOM_Application->getTaxClassesList(), null, 'onchange="updateGross(\'variants_price\');"'); ?></p>
<p><label for="variants_price"><?php echo OSCOM::getDef('field_price_net'); ?></label><?php echo HTML::inputField('variants_price', null, 'onkeyup="updateGross(\'variants_price\')"'); ?></p>
<p><label for="variants_price_gross"><?php echo OSCOM::getDef('field_price_gross'); ?></label><?php echo HTML::inputField('variants_price_gross', null, 'onkeyup="updateNet(\'variants_price\')"'); ?></p>
</fieldset>
<h4><?php echo OSCOM::getDef('subsection_data'); ?></h4>
<fieldset>
<p id="vstatus"><label for="variants_status"><?php echo OSCOM::getDef('field_status'); ?></label><?php echo HTML::radioField('variants_status', array(array('id' => '1', 'text' => OSCOM::getDef('status_enabled')), array('id' => '0', 'text' => OSCOM::getDef('status_disabled')))); ?></p>
<p><label for="variants_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('variants_model', null); ?></p>
<p><label for="variants_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('variants_quantity', null); ?></p>
<p><label for="variants_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('variants_weight', null, 'size="6"'). HTML::selectMenu('variants_weight_class', $OSCOM_Application->getWeightClassesList(), SHIPPING_WEIGHT_UNIT); ?></p>
<p><label for="variants_default"><?php echo OSCOM::getDef('field_default'); ?></label><?php echo HTML::checkboxField('variants_default'); ?></p>
</fieldset>
<script>
$(function() {
$('#vstatus').buttonset();
});
</script>
</td>
</tr>
</table>
<p id="variantSubmitButtonsNew"><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="processVariantForm();"', 'priority' => 'primary', 'icon' => 'plus', 'title' => OSCOM::getDef('button_add'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
<p id="variantSubmitButtonsEdit"><?php echo HTML::button(array('type' => 'button', 'params' => 'data-vButtonType="henrysBucket"', 'priority' => 'primary', 'icon' => 'arrowrefresh-1-n', 'title' => OSCOM::getDef('button_update'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</div>
示例10: while
$Qcategories = $OSCOM_PDO->prepare('select categories_id from :table_products_to_categories where products_id = :products_id');
$Qcategories->bindInt(':products_id', $OSCOM_ObjectInfo->getInt('products_id'));
$Qcategories->execute();
while ( $Qcategories->fetch() ) {
$product_categories_array[] = $Qcategories->valueInt('categories_id');
}
}
$assignedCategoryTree = new CategoryTree();
$assignedCategoryTree->setBreadcrumbUsage(false);
$assignedCategoryTree->setSpacerString(' ', 5);
foreach ($assignedCategoryTree->getArray() as $value) {
echo ' <tr>' . "\n" .
' <td width="50" align="center">' . HTML::checkboxField('categories[]', $value['id'], in_array($value['id'], $product_categories_array), 'id="categories_' . $value['id'] . '"') . '</td>' . "\n" .
' <td><a href="#" onclick="document.product.categories_' . $value['id'] . '.checked=!document.product.categories_' . $value['id'] . '.checked;">' . $value['title'] . '</a></td>' . "\n" .
' </tr>' . "\n";
}
?>
</tbody>
</table>
<script>
$('#productCategoriesDataTable tbody tr:odd').addClass('alt');
$('#productCategoriesDataTable tbody tr').each(function(i) {
$(this).hover( function() { $(this).addClass('mouseOver'); }, function() { $(this).removeClass('mouseOver'); });
});
</script>
示例11: array
<ol>
<li>
<?php
echo HTML::label(OSCOM::getDef('field_search_categories'), 'category');
$OSCOM_CategoryTree->setSpacerString(' ', 2);
$categories_array = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_categories')));
foreach ($OSCOM_CategoryTree->buildBranchArray(0) as $category) {
$categories_array[] = array('id' => $category['id'], 'text' => $category['title']);
}
echo HTML::selectMenu('category', $categories_array);
?>
</li>
<li><?php
echo HTML::checkboxField('recursive', array(array('id' => '1', 'text' => OSCOM::getDef('field_search_recursive'))), true);
?>
</li>
<li>
<?php
echo HTML::label(OSCOM::getDef('field_search_manufacturers'), 'manufacturer');
$manufacturers_array = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_manufacturers')));
$Qmanufacturers = $OSCOM_PDO->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');
$Qmanufacturers->execute();
while ($Qmanufacturers->fetch()) {
$manufacturers_array[] = array('id' => $Qmanufacturers->valueInt('manufacturers_id'), 'text' => $Qmanufacturers->value('manufacturers_name'));
}
echo HTML::selectMenu('manufacturer', $manufacturers_array);
?>
示例12:
<form name="account_newsletter" action="<?php
echo OSCOM::getLink(null, null, 'Newsletters&Process', 'SSL');
?>
" method="post">
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('newsletter_subscriptions_heading');
?>
</h6>
<div class="content">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="30"><?php
echo HTML::checkboxField('newsletter_general', '1', $Qnewsletter->value('customers_newsletter'));
?>
</td>
<td><b><?php
echo HTML::label(OSCOM::getDef('newsletter_general'), 'newsletter_general');
?>
</b></td>
</tr>
<tr>
<td width="30"> </td>
<td><?php
echo OSCOM::getDef('newsletter_general_description');
?>
</td>
</tr>
</table>
示例13: array
<div style="padding-top: 30px;">
<p><?php
echo OSCOM::getDef('order_processed_successfully');
?>
</p>
<p>
<?php
if ($OSCOM_Customer->isLoggedOn()) {
if ($Qglobal->valueInt('global_product_notifications') != 1) {
echo OSCOM::getDef('add_selection_to_product_notifications') . '<br /><p class="productsNotifications">';
$products_displayed = array();
foreach ($products_array as $product) {
if (!in_array($product['id'], $products_displayed)) {
echo HTML::checkboxField('notify[]', $product['id']) . ' ' . $product['text'] . '<br />';
$products_displayed[] = $product['id'];
}
}
} else {
echo sprintf(OSCOM::getDef('view_order_history'), OSCOM::getLink(null, 'Account', null, 'SSL'), OSCOM::getLink(null, 'Account', 'Orders', 'SSL')) . '<br /><br />' . sprintf(OSCOM::getDef('contact_store_owner'), OSCOM::getLink(null, 'Info', 'Contact'));
}
}
?>
</p>
<h2 style="text-align: center;"><?php
echo OSCOM::getDef('thanks_for_shopping_with_us');
?>
</h2>
示例14: array
<p><?php
echo OSCOM::getDef('introduction_export_language');
?>
</p>
<fieldset>
<p>(<a href="javascript:selectAllFromPullDownMenu('groups');"><u><?php
echo OSCOM::getDef('select_all');
?>
</u></a> | <a href="javascript:resetPullDownMenuSelection('groups');"><u><?php
echo OSCOM::getDef('select_none');
?>
</u></a>)<br /><?php
echo HTML::selectMenu('groups[]', $groups_array, array('account', 'checkout', 'general', 'index', 'info', 'order', 'products', 'search'), 'id="groups" size="10" multiple="multiple"');
?>
</p>
<p><?php
echo HTML::checkboxField('include_data', array(array('id' => '', 'text' => OSCOM::getDef('field_export_with_data'))), true);
?>
</p>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-nw', 'title' => OSCOM::getDef('button_export'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
</div>
示例15: while
<td colspan="2"><?php
echo OSCOM::getDef('newsletter_product_notifications_products_description');
?>
</td>
</tr>
<?php
$Qproducts = $OSCOM_Customer->getProductNotifications();
$counter = 0;
while ($Qproducts->next()) {
$counter++;
?>
<tr>
<td width="30"><?php
echo HTML::checkboxField('products[' . $counter . ']', $Qproducts->valueInt('products_id'), true);
?>
</td>
<td><b><?php
echo HTML::label($Qproducts->value('products_name'), 'products[' . $counter . ']');
?>
</b></td>
</tr>
<?php
}
?>
</table>
<?php