Skip to content

Commit

Permalink
#3412 - ucwords to source from template
Browse files Browse the repository at this point in the history
  • Loading branch information
abrookbanks committed Mar 13, 2024
1 parent d776dfd commit 5bec058
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions admin/skins/default/templates/customers.index.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
<div><label for="address_firstname">{$LANG.user.name_first}</label><span><input type="text" name="address[first_name]" id="address_firstname" value="{$ADDRESS.first_name}" class="textbox capitalize"></span></div>
<div><label for="address_lastname">{$LANG.user.name_last}</label><span><input type="text" name="address[last_name]" id="address_lastname" value="{$ADDRESS.last_name}" class="textbox capitalize"></span></div>
<div><label for="address_company">{$LANG.address.company_name}</label><span><input type="text" name="address[company_name]" id="address_company" value="{$ADDRESS.company_name}" class="textbox"></span></div>
<div><label for="address_line1">{$LANG.address.line1}</label><span><input type="text" name="address[line1]" id="address_line1" value="{ucwords($ADDRESS.line1)}" class="textbox"></span></div>
<div><label for="address_line2">{$LANG.address.line2}</label><span><input type="text" name="address[line2]" id="address_line2" value="{ucwords($ADDRESS.line2)}" class="textbox"></span></div>
<div><label for="address_line1">{$LANG.address.line1}</label><span><input type="text" name="address[line1]" id="address_line1" value="{$ADDRESS.line1}" class="textbox"></span></div>
<div><label for="address_line2">{$LANG.address.line2}</label><span><input type="text" name="address[line2]" id="address_line2" value="{$ADDRESS.line2}" class="textbox"></span></div>
<div><label for="address_town">{$LANG.address.town}</label><span><input type="text" name="address[town]" id="address_town" value="{$ADDRESS.town}" class="textbox"></span></div>
<div><label for="country_list">{$LANG.address.country}</label><span>
<select name="address[country]" id="country-list" class="textbox">
Expand Down
12 changes: 6 additions & 6 deletions admin/skins/default/templates/orders.index.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@
</span>
</div>
<div><label for="ajax_title">{$LANG.user.title}</label><span><input type="text" id="ajax_title" name="customer[title]" value="{$SUMMARY.title}" class="textbox billing"></span></div>
<div><label for="ajax_first_name">{$LANG.user.name_first}</label><span><input type="text" id="ajax_first_name" name="customer[first_name]" value="{ucwords($SUMMARY.first_name)}" class="textbox billing required"></span></div>
<div><label for="ajax_last_name">{$LANG.user.name_last}</label><span><input type="text" id="ajax_last_name" name="customer[last_name]" value="{ucwords($SUMMARY.last_name)}" class="textbox billing required"></span></div>
<div><label for="ajax_first_name">{$LANG.user.name_first}</label><span><input type="text" id="ajax_first_name" name="customer[first_name]" value="{$SUMMARY.first_name}" class="textbox billing required"></span></div>
<div><label for="ajax_last_name">{$LANG.user.name_last}</label><span><input type="text" id="ajax_last_name" name="customer[last_name]" value="{$SUMMARY.last_name}" class="textbox billing required"></span></div>
<div><label for="sum_company_name">{$LANG.address.company_name}</label><span><input type="text" id="sum_company_name" name="customer[company_name]" value="{$SUMMARY.company_name}" class="textbox billing"></span></div>
<div><label for="sum_line1">{$LANG.address.line1}</label><span><input type="text" id="sum_line1" name="customer[line1]" value="{ucwords($SUMMARY.line1)}" class="textbox billing required"></span></div>
<div><label for="sum_line2">{$LANG.address.line2}</label><span><input type="text" id="sum_line2" name="customer[line2]" value="{ucwords($SUMMARY.line2)}" class="textbox billing"></span></div>
<div><label for="sum_line1">{$LANG.address.line1}</label><span><input type="text" id="sum_line1" name="customer[line1]" value="{$SUMMARY.line1}" class="textbox billing required"></span></div>
<div><label for="sum_line2">{$LANG.address.line2}</label><span><input type="text" id="sum_line2" name="customer[line2]" value="{$SUMMARY.line2}" class="textbox billing"></span></div>
<div><label for="sum_town">{$LANG.address.town}</label><span><input type="text" id="sum_town" name="customer[town]" value="{$SUMMARY.town}" class="textbox billing required"></span></div>
<div>
<label for="sum_country">{$LANG.address.country}</label>
Expand Down Expand Up @@ -371,8 +371,8 @@
<div><label for="d_ajax_first_name">{$LANG.user.name_first}</label><span><input type="text" id="d_ajax_first_name" name="customer[first_name_d]" value="{$SUMMARY.first_name_d}" class="textbox required"></span></div>
<div><label for="d_ajax_last_name">{$LANG.user.name_last}</label><span><input type="text" id="d_ajax_last_name" name="customer[last_name_d]" value="{$SUMMARY.last_name_d}" class="textbox required"></span></div>
<div><label for="d_sum_company_name">{$LANG.address.company_name}</label><span><input type="text" id="d_sum_company_name" name="customer[company_name_d]" value="{$SUMMARY.company_name_d}" class="textbox"></span></div>
<div><label for="d_sum_line1">{$LANG.address.line1}</label><span><input type="text" id="d_sum_line1" name="customer[line1_d]" value="{ucwords($SUMMARY.line1_d)}" class="textbox required"></span></div>
<div><label for="d_sum_line2">{$LANG.address.line2}</label><span><input type="text" id="d_sum_line2" name="customer[line2_d]" value="{ucwords($SUMMARY.line2_d)}" class="textbox"></span></div>
<div><label for="d_sum_line1">{$LANG.address.line1}</label><span><input type="text" id="d_sum_line1" name="customer[line1_d]" value="{$SUMMARY.line1_d}" class="textbox required"></span></div>
<div><label for="d_sum_line2">{$LANG.address.line2}</label><span><input type="text" id="d_sum_line2" name="customer[line2_d]" value="{$SUMMARY.line2_d}" class="textbox"></span></div>
<div><label for="d_sum_town">{$LANG.address.town}</label><span><input type="text" id="d_sum_town" name="customer[town_d]" value="{$SUMMARY.town_d}" class="textbox required"></span></div>
<div>
<label for="d_sum_country">{$LANG.address.country}</label>
Expand Down
2 changes: 2 additions & 0 deletions admin/sources/customers.index.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@
$GLOBALS['smarty']->assign('COUNTRIESL', $smarty_data['countries']);
$GLOBALS['smarty']->assign('JSON_STATE', state_json());
}
$address[0]['line1'] = ucwords((string)$address[0]['line1']);
$address[0]['line2'] = ucwords((string)$address[0]['line2']);
$GLOBALS['smarty']->assign('ADDRESS', $address[0]);
}
$GLOBALS['smarty']->assign('DISPLAY_ADDRESS_EDIT', true);
Expand Down
6 changes: 6 additions & 0 deletions admin/sources/orders.index.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@
} else {
$summary[0]['discount_form'] = number_format($summary[0]['discount'], 2);
}
$summary[0]['first_name'] = ucwords((string)$summary[0]['first_name']);
$summary[0]['last_name'] = ucwords((string)$summary[0]['last_name']);
$summary[0]['line1'] = ucwords((string)$summary[0]['line1']);
$summary[0]['line2'] = ucwords((string)$summary[0]['line2']);
$summary[0]['line1_d'] = ucwords((string)$summary[0]['line1_d']);
$summary[0]['line2_d'] = ucwords((string)$summary[0]['line2_d']);

$GLOBALS['smarty']->assign('SUMMARY', $summary[0]);
if ($summary[0]['status'] >= 3) {
Expand Down

0 comments on commit 5bec058

Please sign in to comment.