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

Commit

Permalink
Update to Bootstrap 4
Browse files Browse the repository at this point in the history
and other mods
  • Loading branch information
gburton committed Oct 16, 2018
1 parent 527b15e commit 0f28c29
Show file tree
Hide file tree
Showing 387 changed files with 9,660 additions and 4,947 deletions.
67 changes: 36 additions & 31 deletions account_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2013 osCommerce
Copyright (c) 2018 osCommerce
Released under the GNU General Public License
*/
Expand Down Expand Up @@ -122,17 +122,17 @@
require('includes/template_top.php');
?>

<div class="page-header">
<h1 class="h3"><?php echo HEADING_TITLE; ?></h1>
</div>

<h1 class="display-4"><?php echo HEADING_TITLE; ?></h1>


<?php
if ($messageStack->size('account_edit') > 0) {
echo $messageStack->output('account_edit');
}
?>

<?php echo tep_draw_form('account_edit', tep_href_link('account_edit.php', '', 'SSL'), 'post', 'class="form-horizontal"', true) . tep_draw_hidden_field('action', 'process'); ?>
<?php echo tep_draw_form('account_edit', tep_href_link('account_edit.php', '', 'SSL'), 'post', '', true) . tep_draw_hidden_field('action', 'process'); ?>

<div class="contentContainer">
<div class="text-danger text-right"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
Expand All @@ -146,31 +146,35 @@
}
$female = !$male;
?>
<div class="form-group has-feedback">
<label class="control-label col-sm-3"><?php echo ENTRY_GENDER; ?></label>
<div class="form-group row">
<label class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_GENDER; ?></label>
<div class="col-sm-9">
<label class="radio-inline">
<?php echo tep_draw_radio_field('gender', 'm', $male, 'required aria-required="true" aria-describedby="atGender"') . ' ' . MALE; ?>
</label>
<label class="radio-inline">
<?php echo tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE; ?>
</label>
<?php echo FORM_REQUIRED_INPUT; ?>
<?php if (tep_not_null(ENTRY_GENDER_TEXT)) echo '<span id="atGender" class="help-block">' . ENTRY_GENDER_TEXT . '</span>'; ?>
</div>
<div class="form-check form-check-inline">
<?php echo tep_draw_radio_field('gender', 'm', $male, 'required aria-required="true" id="genderM" aria-describedby="atGender"'); ?>
&nbsp;<label class="form-check-label" for="genderM"><?php echo MALE; ?></label>
</div>
<div class="form-check form-check-inline">
<?php echo tep_draw_radio_field('gender', 'f', $female, 'id="genderF" aria-describedby="atGender"'); ?>
&nbsp;<label class="form-check-label" for="genderF"><?php echo FEMALE; ?></label>
</div>
<?php if (tep_not_null(ENTRY_GENDER_TEXT)) echo '<span id="atGender" class="form-text">' . ENTRY_GENDER_TEXT . '</span>'; ?>
<div class="float-right">
<?php echo FORM_REQUIRED_INPUT; ?>
</div>
</div>
</div>
<?php
}
?>
<div class="form-group has-feedback">
<label for="inputFirstName" class="control-label col-sm-3"><?php echo ENTRY_FIRST_NAME; ?></label>
<div class="form-group row">
<label for="inputFirstName" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_FIRST_NAME; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('firstname', $account['customers_firstname'], 'required aria-required="true" id="inputFirstName" placeholder="' . ENTRY_FIRST_NAME_TEXT . '"'); ?>
<?php echo FORM_REQUIRED_INPUT; ?>
</div>
</div>
<div class="form-group has-feedback">
<label for="inputLastName" class="control-label col-sm-3"><?php echo ENTRY_LAST_NAME; ?></label>
<div class="form-group row">
<label for="inputLastName" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_LAST_NAME; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('lastname', $account['customers_lastname'], 'required aria-required="true" id="inputLastName" placeholder="' . ENTRY_LAST_NAME_TEXT . '"'); ?>
<?php echo FORM_REQUIRED_INPUT; ?>
Expand All @@ -180,8 +184,8 @@
<?php
if (ACCOUNT_DOB == 'true') {
?>
<div class="form-group has-feedback">
<label for="inputName" class="control-label col-sm-3"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<div class="form-group row">
<label for="inputName" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('dob', tep_date_short($account['customers_dob']), 'required aria-required="true" id="dob" placeholder="' . ENTRY_DATE_OF_BIRTH_TEXT . '"'); ?>
<?php echo FORM_REQUIRED_INPUT; ?>
Expand All @@ -191,31 +195,32 @@
}
?>

<div class="form-group has-feedback">
<label for="inputEmail" class="control-label col-sm-3"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<div class="form-group row">
<label for="inputEmail" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('email_address', $account['customers_email_address'], 'required aria-required="true" id="inputEmail" placeholder="' . ENTRY_EMAIL_ADDRESS_TEXT . '"', 'email'); ?>
<?php echo FORM_REQUIRED_INPUT; ?>
</div>
</div>
<div class="form-group has-feedback">
<label for="inputTelephone" class="control-label col-sm-3"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
<div class="form-group row">
<label for="inputTelephone" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('telephone', $account['customers_telephone'], 'required aria-required="true" id="inputTelephone" placeholder="' . ENTRY_TELEPHONE_NUMBER_TEXT . '"', 'tel'); ?>
<?php echo FORM_REQUIRED_INPUT; ?>
</div>
</div>
<div class="form-group">
<label for="inputFax" class="control-label col-sm-3"><?php echo ENTRY_FAX_NUMBER; ?></label>
<div class="form-group row">
<label for="inputFax" class="col-form-label col-sm-3 text-left text-sm-right"><?php echo ENTRY_FAX_NUMBER; ?></label>
<div class="col-sm-9">
<?php echo tep_draw_input_field('fax', $account['customers_fax'], 'id="inputFax" placeholder="' . ENTRY_FAX_NUMBER_TEXT . '"'); ?>
</div>
</div>

<div class="buttonSet row">
<div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'fa fa-angle-left', tep_href_link('account.php', '', 'SSL')); ?></div>
<div class="col-xs-6 text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', null, 'primary', null, 'btn-success'); ?></div>
<div class="buttonSet">
<div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', null, 'primary', null, 'btn-success btn-lg btn-block'); ?></div>
<p><?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'fa fa-angle-left', tep_href_link('account.php', '', 'SSL')); ?></p>
</div>

</div>

</form>
Expand Down
54 changes: 34 additions & 20 deletions account_history.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Copyright (c) 2018 osCommerce
Released under the GNU General Public License
*/
Expand All @@ -25,16 +25,29 @@
require('includes/template_top.php');
?>

<div class="page-header">
<h1 class="h3"><?php echo HEADING_TITLE; ?></h1>
</div>
<h1 class="display-4"><?php echo HEADING_TITLE; ?></h1>

<div class="contentContainer">

<?php
$orders_total = tep_count_customer_orders();

if ($orders_total > 0) {
?>
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col"><?php echo TEXT_ORDER_NUMBER; ?></th>
<th scope="col"><?php echo TEXT_ORDER_STATUS; ?></th>
<th scope="col"><?php echo TEXT_ORDER_DATE; ?></th>
<th scope="col"><?php echo TEXT_ORDER_PRODUCTS; ?></th>
<th scope="col"><?php echo TEXT_ORDER_COST; ?></th>
<th scope="col"><?php echo TEXT_VIEW_ORDER; ?></th>
</tr>
</thead>
<tbody>

<?php
$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id DESC";
$history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);
$history_query = tep_db_query($history_split->sql_query);
Expand All @@ -51,28 +64,29 @@
$order_name = $history['billing_name'];
}
?>

<div class="contentText">
<div class="panel panel-info">
<div class="panel-heading"><strong><?php echo TEXT_ORDER_NUMBER . ' ' . $history['orders_id'] . ' <span class="contentText">(' . $history['orders_status_name'] . ')</span>'; ?></strong></div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6"><?php echo '<strong>' . TEXT_ORDER_DATE . '</strong> ' . tep_date_long($history['date_purchased']) . '<br /><strong>' . $order_type . '</strong> ' . tep_output_string_protected($order_name); ?></div>
<br class="visible-xs" />
<div class="col-sm-6"><?php echo '<strong>' . TEXT_ORDER_PRODUCTS . '</strong> ' . $products['count'] . '<br /><strong>' . TEXT_ORDER_COST . '</strong> ' . strip_tags($history['order_total']); ?></div>
</div>
</div>
<div class="panel-footer"><?php echo tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-file', tep_href_link('account_history_info.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL'), 'primary', NULL, 'btn-primary btn-xs'); ?></div>
</div>
</div>
<tr>
<th scope="row"><?php echo $history['orders_id']; ?></td>
<td><?php echo $history['orders_status_name']; ?></td>
<td><?php echo tep_date_long($history['date_purchased']); ?></td>
<td><?php echo $products['count']; ?></td>
<td><?php echo strip_tags($history['order_total']); ?></td>
<td><?php echo tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-file', tep_href_link('account_history_info.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . (int)$history['orders_id'], 'SSL'), 'primary', NULL, 'btn-primary btn-sm btn-block'); ?></td>
</tr>

<?php
}
?>
</tbody>
</table>

<div class="row">
<div class="col-md-6 pagenumber"><?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></div>
<div class="col-md-6"><span class="pull-right pagenav"><ul class="pagination"><?php echo $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></ul></span><span class="pull-right"><?php echo TEXT_RESULT_PAGE; ?></span></div>
<div class="col-sm-6 pagenumber d-none d-sm-block">
<span class="align-middle"><?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></span>
</div>
<div class="col-sm-6">
<?php echo $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>
</div>
</div>

<?php
} else {
Expand Down
Loading

0 comments on commit 0f28c29

Please sign in to comment.