本文整理汇总了PHP中osCommerce\OM\Core\HTML::radioField方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::radioField方法的具体用法?PHP HTML::radioField怎么用?PHP HTML::radioField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::radioField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse
public static function parse($data)
{
$default_value = null;
foreach ($data['data'] as $variant) {
if ($variant['default'] === true) {
$default_value = (string) $variant['id'];
break;
}
}
$string = '<table border="0" cellspacing="0" cellpadding="2">' . ' <tr>' . ' <td width="100">' . $data['title'] . ':</td>' . ' <td>' . HTML::radioField('variants[' . $data['group_id'] . ']', $data['data'], $default_value, 'onchange="refreshVariants();" id="variants_' . $data['group_id'] . '"') . '</td>' . ' </tr>' . '</table>';
return $string;
}
示例2: array
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\Site\Shop\Address;
?>
<ol>
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => OSCOM::getDef('gender_male')), array('id' => 'f', 'text' => OSCOM::getDef('gender_female')));
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_gender'), 'gender_1', null, ACCOUNT_GENDER > 0) . HTML::radioField('gender', $gender_array, isset($osC_oiAddress) && $osC_oiAddress->exists('gender') ? $osC_oiAddress->get('gender') : (!$OSCOM_Customer->hasDefaultAddress() ? $OSCOM_Customer->getGender() : null));
?>
</li>
<?php
}
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_first_name'), 'firstname', null, true) . HTML::inputField('firstname', isset($osC_oiAddress) && $osC_oiAddress->exists('firstname') ? $osC_oiAddress->get('firstname') : (!$OSCOM_Customer->hasDefaultAddress() ? $OSCOM_Customer->getFirstName() : null));
?>
</tli>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_last_name'), 'lastname', null, true) . HTML::inputField('lastname', isset($osC_oiAddress) && $osC_oiAddress->exists('lastname') ? $osC_oiAddress->get('lastname') : (!$OSCOM_Customer->hasDefaultAddress() ? $OSCOM_Customer->getLastName() : null));
?>
</li>
示例3: array
<p><?php
echo OSCOM::getDef('introduction_import_language');
?>
</p>
<fieldset>
<p><label for="language_import"><?php
echo OSCOM::getDef('field_language_selection');
?>
</label><?php
echo HTML::selectMenu('language_import', $languages_array);
?>
</p>
<p><label for="import_type"><?php
echo OSCOM::getDef('field_import_type');
?>
</label><br /><?php
echo HTML::radioField('import_type', array(array('id' => 'add', 'text' => OSCOM::getDef('only_add_new_records')), array('id' => 'update', 'text' => OSCOM::getDef('only_update_existing_records')), array('id' => 'replace', 'text' => OSCOM::getDef('replace_all'))), 'add', null, '<br />');
?>
</p>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-se', 'title' => OSCOM::getDef('button_import'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
</div>
示例4:
?>
</h3>
<form name="cUpdate" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'UpdateRates&Process');
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_update_exchange_rates');
?>
</p>
<fieldset>
<p><?php
echo HTML::radioField('service', $services, null, null, '<br />');
?>
</p>
</fieldset>
<p><?php
echo OSCOM::getDef('service_terms_agreement');
?>
</p>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'refresh', 'title' => OSCOM::getDef('button_update'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
示例5: array
</li>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_email_address'), 'customer_email_address') . HTML::inputField('customer_email_address');
?>
</li>
<?php
}
?>
<li><?php
echo HTML::textareaField('review', null, null, 15, 'style="width: 98%;"');
?>
</li>
<li><?php
echo OSCOM::getDef('field_review_rating') . ' ' . OSCOM::getDef('review_lowest_rating_title') . ' ' . HTML::radioField('rating', array('1', '2', '3', '4', '5')) . ' ' . OSCOM::getDef('review_highest_rating_title');
?>
</li>
</ol>
</div>
</div>
<div class="submitFormButtons">
<span style="float: right;"><?php
echo HTML::button(array('icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue')));
?>
</span>
<?php
echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Reviews&' . $OSCOM_Product->getID()), 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back')));
?>
示例6: array
<h6><?php
echo OSCOM::getDef('my_account_title');
?>
</h6>
<div class="content">
<ol>
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => OSCOM::getDef('gender_male')), array('id' => 'f', 'text' => OSCOM::getDef('gender_female')));
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_gender'), 'gender_1', null, ACCOUNT_GENDER > 0) . HTML::radioField('gender', $gender_array);
?>
</li>
<?php
}
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_first_name'), 'firstname', null, true) . HTML::inputField('firstname');
?>
</li>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_last_name'), 'lastname', null, true) . HTML::inputField('lastname');
?>
</li>
示例7:
}
?>
<td width="10"> </td>
<td width="75%"><?php
echo $methods['title'];
?>
</td>
<?php
if ($OSCOM_Shipping->numberOfQuotes() > 1 || count($quotes['methods']) > 1) {
?>
<td><?php
echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']);
?>
</td>
<td align="right"><?php
echo HTML::radioField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id'], $OSCOM_ShoppingCart->getShippingMethod('id'));
?>
</td>
<?php
} else {
?>
<td align="right" colspan="2"><?php
echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']) . HTML::hiddenField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id']);
?>
</td>
<?php
}
?>
<td width="10"> </td>
</tr>
<?php
示例8:
} else {
echo '<h3>' . HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('customers_name') . '</h3>';
}
?>
<fieldset>
<?php
if (ACCOUNT_GENDER > -1) {
?>
<p id="abGenderFields"><label for="ab_gender"><?php
echo OSCOM::getDef('field_gender');
?>
</label><?php
echo HTML::radioField('ab_gender', $gender_array, 'm', null, '');
?>
</p>
<script>
$('input[name="ab_gender"]').removeAttr('checked');
$('input[name="ab_gender"]').filter('[value="' + $('input[name="gender"]:checked').val() + '"]').attr('checked', true);
$('#abGenderFields').buttonset();
</script>
<?php
}
?>
<p><label for="ab_firstname"><?php
echo OSCOM::getDef('field_first_name');
示例9: array
<h1><?php
echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle());
?>
</h1>
<?php
if ($OSCOM_MessageStack->exists()) {
echo $OSCOM_MessageStack->get();
}
?>
<div id="sectionMenuContainer" style="float: left; padding-bottom: 10px;">
<span class="ui-widget-header ui-corner-all" style="padding: 10px 4px;">
<span id="sectionMenu"><?php
echo HTML::radioField('sections', array(array('id' => 'personal', 'text' => OSCOM::getDef('section_personal')), array('id' => 'password', 'text' => OSCOM::getDef('section_password')), array('id' => 'addressBook', 'text' => OSCOM::getDef('section_address_book')), array('id' => 'newsletters', 'text' => OSCOM::getDef('section_newsletters')), array('id' => 'map', 'text' => OSCOM::getDef('section_map')), array('id' => 'social', 'text' => OSCOM::getDef('section_social'))), isset($_GET['tabIndex']) ? $_GET['tabIndex'] : null, null, '');
?>
</span>
</span>
</div>
<script>
$(function() {
$('#sectionMenu').buttonsetTabs();
});
</script>
<form id="cEditForm" name="cEdit" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'Save&Process');
?>
" method="post">
示例10: array
<h6><?php
echo OSCOM::getDef('my_account_title');
?>
</h6>
<div class="content">
<ol>
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => OSCOM::getDef('gender_male')), array('id' => 'f', 'text' => OSCOM::getDef('gender_female')));
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_gender'), 'gender_1', null, ACCOUNT_GENDER > 0) . HTML::radioField('gender', $gender_array, $Qaccount->value('customers_gender'));
?>
</li>
<?php
}
?>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_first_name'), 'firstname', null, true) . ' ' . HTML::inputField('firstname', $Qaccount->value('customers_firstname'));
?>
</li>
<li><?php
echo HTML::label(OSCOM::getDef('field_customer_last_name'), 'lastname', null, true) . ' ' . HTML::inputField('lastname', $Qaccount->value('customers_lastname'));
?>
</li>
示例11:
} else {
echo '<h3>' . HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('customers_name') . '</h3>';
}
?>
<fieldset>
<?php
if (ACCOUNT_GENDER > -1) {
?>
<p id="genderFields"><label for="gender"><?php
echo OSCOM::getDef('field_gender');
?>
</label><?php
echo HTML::radioField('gender', $gender_array, $new_customer ? 'm' : $OSCOM_ObjectInfo->get('customers_gender'), null, '');
?>
</p>
<script>$('#genderFields').buttonset();</script>
<?php
}
?>
<p><label for="firstname"><?php
echo OSCOM::getDef('field_first_name');
?>
</label><?php
echo HTML::inputField('firstname', $new_customer ? null : $OSCOM_ObjectInfo->get('customers_firstname'));
?>
示例12: array
</ul>
</fieldset>
</td>
<td width="70%" valign="top">
<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>
示例13: in
<?php
$Qadmins = $OSCOM_PDO->query('select id, user_name from :table_administrators where id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by user_name');
$Qadmins->execute();
$names_string = '';
while ($Qadmins->fetch()) {
$names_string .= HTML::hiddenField('batch[]', $Qadmins->valueInt('id')) . '<b>' . $Qadmins->valueProtected('user_name') . '</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
?>
<fieldset>
<p><?php
echo HTML::radioField('mode', array(array('id' => Administrators::ACCESS_MODE_ADD, 'text' => OSCOM::getDef('add_to')), array('id' => Administrators::ACCESS_MODE_REMOVE, 'text' => OSCOM::getDef('remove_from')), array('id' => Administrators::ACCESS_MODE_SET, 'text' => OSCOM::getDef('set_to'))), Administrators::ACCESS_MODE_ADD);
?>
</p>
<p><select name="accessModules" id="modulesList"><option value="-1" disabled="disabled">-- Access Modules --</option><option value="0"><?php
echo OSCOM::getDef('global_access');
?>
</option></select></p>
<ul id="accessToModules" class="modulesListing"></ul>
</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>
示例14: array
<fieldset>
<p><label for="products_price_tax_class"><?php echo OSCOM::getDef('field_tax_class'); ?></label><?php echo HTML::selectMenu('products_tax_class_id', $OSCOM_Application->getTaxClassesList(), (!$new_product ? $OSCOM_ObjectInfo->getInt('products_tax_class_id') : null), 'id="products_price_tax_class" onchange="updateGross(\'products_price\');"'); ?></p>
<p><label for="products_price"><?php echo OSCOM::getDef('field_price_net'); ?></label><?php echo HTML::inputField('products_price', (!$new_product ? $OSCOM_ObjectInfo->get('products_price') : null), 'onkeyup="updateGross(\'products_price\')"'); ?></p>
<p><label for="products_price_gross"><?php echo OSCOM::getDef('field_price_gross'); ?></label><?php echo HTML::inputField('products_price_gross', (!$new_product ? $OSCOM_ObjectInfo->get('products_price') : null), 'onkeyup="updateNet(\'products_price\')"'); ?></p>
</fieldset>
</td>
<?php
}
?>
<td width="<?php echo $data_width;?>" height="100%" valign="top">
<h4><?php echo OSCOM::getDef('subsection_data'); ?></h4>
<fieldset>
<p id="productStatusField"><label for="products_status"><?php echo OSCOM::getDef('field_status'); ?></label><?php echo HTML::radioField('products_status', array(array('id' => '1', 'text' => OSCOM::getDef('status_enabled')), array('id' => '0', 'text' => OSCOM::getDef('status_disabled'))), (!$new_product ? $OSCOM_ObjectInfo->get('products_status') : '0')); ?></p>
<script>$('#productStatusField').buttonset();</script>
<?php
if ( $new_product || ($OSCOM_ObjectInfo->getInt('has_children') !== 1) ) {
?>
<p><label for="products_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('products_model', (!$new_product ? $OSCOM_ObjectInfo->get('products_model') : null)); ?></p>
<p><label for="products_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('products_quantity', (!$new_product ? $OSCOM_ObjectInfo->get('products_quantity') : null)); ?></p>
<p><label for="products_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('products_weight', (!$new_product ? $OSCOM_ObjectInfo->get('products_weight') : null)) . HTML::selectMenu('products_weight_class', $OSCOM_Application->getWeightClassesList(), (!$new_product ? $OSCOM_ObjectInfo->get('products_weight_class') : SHIPPING_WEIGHT_UNIT)); ?></p>
<?php
}
?>
示例15: in
echo OSCOM::getLink(null, null, 'BatchSave&Process');
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_batch_edit_cards');
?>
</p>
<?php
$Qcc = $OSCOM_PDO->query('select id, credit_card_name from :table_credit_cards where id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by credit_card_name');
$Qcc->execute();
$names_string = '';
while ($Qcc->fetch()) {
$names_string .= HTML::hiddenField('batch[]', $Qcc->valueInt('id')) . '<b>' . $Qcc->valueProtected('credit_card_name') . '</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
echo '<p>' . HTML::radioField('type', array(array('id' => 'activate', 'text' => OSCOM::getDef('activate')), array('id' => 'deactivate', 'text' => OSCOM::getDef('deactivate'))), 'activate') . '</p>';
?>
<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>