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

Commit

Permalink
Checkboxes need a custom-control *each*
Browse files Browse the repository at this point in the history
  • Loading branch information
gburton committed Sep 5, 2019
1 parent 9e97ba0 commit 7a9402b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions account_notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@

<div class="form-group row align-items-center">
<div class="col-form-label col-sm-4 text-left text-sm-right"><?php echo GLOBAL_NOTIFICATIONS_TITLE; ?></div>
<div class="col-sm-8 pl-5 custom-control custom-switch">
<?php echo tep_draw_checkbox_field('product_global', '1', (($global['global_product_notifications'] == '1') ? true : false), 'class="custom-control-input" id="inputGlobalNotification"');
echo '<label for="inputGlobalNotification" class="custom-control-label">' . GLOBAL_NOTIFICATIONS_DESCRIPTION . '&nbsp;</label>';
?>
<div class="col-sm-8">
<div class="custom-control custom-switch">
<?php echo tep_draw_checkbox_field('product_global', '1', (($global['global_product_notifications'] == '1') ? true : false), 'class="custom-control-input" id="inputGlobalNotification"');
echo '<label for="inputGlobalNotification" class="custom-control-label">' . GLOBAL_NOTIFICATIONS_DESCRIPTION . '&nbsp;</label>';
?>
</div>
</div>
</div>

Expand All @@ -103,13 +105,14 @@

<div class="form-group row align-items-center">
<div class="col-form-label col-sm-4 text-left text-sm-right"><?php echo MY_NOTIFICATIONS_TITLE; ?></div>
<div class="col-sm-8 pl-5 custom-control custom-switch">
<div class="col-sm-8">
<?php
$products_query = tep_db_query("select pd.products_id, pd.products_name from products_description pd, 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)) {
echo tep_draw_checkbox_field('products[]', $products['products_id'], true, 'class="custom-control-input" id="input_' . $products['products_id'] . 'Notification"');
echo '<label for="input_' . $products['products_id'] . 'Notification" class="custom-control-label">' . $products['products_name'] . '</label>';
echo '<div class="w-100"></div>';
echo '<div class="custom-control custom-switch">';
echo tep_draw_checkbox_field('products[]', $products['products_id'], true, 'class="custom-control-input" id="input_' . $products['products_id'] . 'Notification"');
echo '<label for="input_' . $products['products_id'] . 'Notification" class="custom-control-label">' . $products['products_name'] . '</label>';
echo '</div>';
}
?>
</div>
Expand Down

0 comments on commit 7a9402b

Please sign in to comment.