Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Display of checkboxes
Browse files Browse the repository at this point in the history
Line up checkboxes
  • Loading branch information
gburton committed Jan 9, 2015
1 parent 2f3acf7 commit 10a527a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 33 deletions.
10 changes: 6 additions & 4 deletions account_newsletters.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@
<div class="form-group">
<label class="control-label col-xs-4"><?php echo MY_NEWSLETTERS_GENERAL_NEWSLETTER; ?></label>
<div class="col-xs-8">
<label class="checkbox-inline">
<?php echo tep_draw_checkbox_field('newsletter_general', '1', (($newsletter['customers_newsletter'] == '1') ? true : false)); ?>
</label>
<?php if (tep_not_null(MY_NEWSLETTERS_GENERAL_NEWSLETTER_DESCRIPTION)) echo '<span class="help-block">' . MY_NEWSLETTERS_GENERAL_NEWSLETTER_DESCRIPTION . '</span>'; ?>
<div class="checkbox">
<label>
<?php echo tep_draw_checkbox_field('newsletter_general', '1', (($newsletter['customers_newsletter'] == '1') ? true : false)); ?>
<?php if (tep_not_null(MY_NEWSLETTERS_GENERAL_NEWSLETTER_DESCRIPTION)) echo MY_NEWSLETTERS_GENERAL_NEWSLETTER_DESCRIPTION; ?>
</label>
</div>
</div>
</div>
</div>
Expand Down
19 changes: 11 additions & 8 deletions account_notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
<div class="form-group">
<label class="control-label col-xs-4"><?php echo GLOBAL_NOTIFICATIONS_TITLE; ?></label>
<div class="col-xs-8">
<label class="checkbox-inline">
<?php echo tep_draw_checkbox_field('product_global', '1', (($global['global_product_notifications'] == '1') ? true : false)); ?>
</label>
<?php if (tep_not_null(GLOBAL_NOTIFICATIONS_DESCRIPTION)) echo '<span class="help-block">' . GLOBAL_NOTIFICATIONS_DESCRIPTION . '</span>'; ?>
<div class="checkbox">
<label>
<?php echo tep_draw_checkbox_field('product_global', '1', (($global['global_product_notifications'] == '1') ? true : false)); ?>
<?php if (tep_not_null(GLOBAL_NOTIFICATIONS_DESCRIPTION)) echo GLOBAL_NOTIFICATIONS_DESCRIPTION; ?>
</label>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -121,10 +123,11 @@
$products_query = tep_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . (int)$customer_id . "' and pn.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name");
while ($products = tep_db_fetch_array($products_query)) {
?>
<label class="checkbox-inline">
<?php echo tep_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true); ?>
</label>
<?php echo '<span class="help-block">' . $products['products_name'] . '</span>'; ?>
<div class="checkbox">
<label>
<?php echo tep_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true) . $products['products_name']; ?>
</label>
</div>
<?php
}
?>
Expand Down
6 changes: 2 additions & 4 deletions advanced_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,9 @@ function check_form() {
<div class="form-group">
<label for="entryIncludeSubs" class="control-label col-xs-3"><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
<div class="col-xs-9">
<div class="checkbox-inline">
<div class="checkbox">
<label>
<?php
echo tep_draw_checkbox_field('inc_subcat', '1', true, 'id="entryIncludeSubs"');
?>
<?php echo tep_draw_checkbox_field('inc_subcat', '1', true, 'id="entryIncludeSubs"'); ?>
</label>
</div>
</div>
Expand Down
13 changes: 5 additions & 8 deletions create_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,17 +481,14 @@
</div>
</div>
<div class="form-group">
<div class="col-xs-offset-3 col-sm-9">
<label for="inputNewsletter" class="control-label col-xs-3"><?php echo ENTRY_NEWSLETTER; ?></label>
<div class="col-xs-9">
<div class="checkbox">
<label for="inputNewsletter">
<?php
echo tep_draw_checkbox_field('newsletter', '1', NULL, 'id="inputNewsletter"') . ' ' . ENTRY_NEWSLETTER;
?>
<label>
<?php echo tep_draw_checkbox_field('newsletter', '1', NULL, 'id="inputNewsletter"'); ?>
<?php if (tep_not_null(ENTRY_NEWSLETTER_TEXT)) echo ENTRY_NEWSLETTER_TEXT; ?>
</label>
</div>
<?php
if (tep_not_null(ENTRY_NEWSLETTER_TEXT)) echo '<span class="help-block">' . ENTRY_NEWSLETTER_TEXT . '</span>';
?>
</div>
</div>

Expand Down
10 changes: 3 additions & 7 deletions includes/modules/address_book_details.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,12 @@
<div class="form-group">
<label for="primary" class="control-label col-xs-3"><?php echo SET_AS_PRIMARY; ?></label>
<div class="col-xs-9">
<div class="checkbox-inline">
<div class="checkbox">
<label>
<?php
echo tep_draw_checkbox_field('primary', 'on', false, 'id="primary"');
?>
<?php echo tep_draw_checkbox_field('primary', 'on', false, 'id="primary"'); ?>
<?php if (tep_not_null(ENTRY_NEWSLETTER_TEXT)) echo ENTRY_NEWSLETTER_TEXT; ?>
</label>
</div>
<?php
if (tep_not_null(ENTRY_NEWSLETTER_TEXT)) echo '<span class="help-block">' . ENTRY_NEWSLETTER_TEXT . '</span>';
?>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ function execute() {
$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
if ( !isset($products_displayed[$products['products_id']]) ) {
$products_displayed[$products['products_id']] = '<label class="checkbox-inline"> ' . tep_draw_checkbox_field('notify[]', $products['products_id']) . ' ' . $products['products_name'] . '</label>';
$products_displayed[$products['products_id']] = '<div class="checkbox"><label> ' . tep_draw_checkbox_field('notify[]', $products['products_id']) . ' ' . $products['products_name'] . '</label></div>';
}
}

$products_notifications = implode('<br />', $products_displayed);
$products_notifications = implode('', $products_displayed);

ob_start();
include(DIR_WS_MODULES . 'content/' . $this->group . '/templates/product_notifications.php');
Expand Down

0 comments on commit 10a527a

Please sign in to comment.