[+] Project: it's possible to create new genders, "Miss" gender is now added

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8578 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-14 15:15:51 +00:00
parent 62a578b314
commit 03eaee9bf4
35 changed files with 777 additions and 526 deletions
+7 -5
View File
@@ -323,6 +323,8 @@ class AuthControllerCore extends FrontController
));
}
$this->context->smarty->assign('genders', Gender::getGenders());
/* Generate years, months and days */
if (isset($_POST['years']) AND is_numeric($_POST['years']))
$selectedYears = (int)($_POST['years']);
@@ -364,13 +366,13 @@ class AuthControllerCore extends FrontController
if (!empty($back))
{
$this->context->smarty->assign('back', Tools::safeOutput($back));
if (strpos($back, 'order.php') !== false)
if (strpos($back, 'order') !== false)
{
if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
else
$countries = Country::getCountries($this->context->language->id, true);
$this->context->smarty->assign(array(
'inOrderProcess' => true,
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
@@ -394,16 +396,16 @@ class AuthControllerCore extends FrontController
$addressItems = array();
$addressFormat = AddressFormat::getOrderedAddressFields(Configuration::get('PS_COUNTRY_DEFAULT'), false, true);
$requireFormFieldsList = AddressFormat::$requireFormFieldsList;
foreach ($addressFormat as $addressline)
foreach (explode(' ', $addressline) as $addressItem)
$addressItems[] = trim($addressItem);
// Add missing require fields for a new user susbscription form
foreach($requireFormFieldsList as $fieldName)
if (!in_array($fieldName, $addressItems))
$addressItems[] = trim($fieldName);
foreach (array('inv', 'dlv') as $addressType)
$this->context->smarty->assign(array($addressType.'_adr_fields' => $addressFormat, $addressType.'_all_fields' => $addressItems));
}