[-] FO : Fix bug #PSCFV-5168, required phone in all templates

This commit is contained in:
gRoussac
2013-03-11 19:01:58 +01:00
parent f3579dd5eb
commit a03bf13b8f
7 changed files with 24 additions and 25 deletions
+1 -3
View File
@@ -321,9 +321,7 @@ class OrderOpcControllerCore extends ParentOrderController
'errorTOS' => Tools::displayError('You must accept the Terms of Service before', false),
'isPaymentStep' => (bool)(isset($_GET['isPaymentStep']) && $_GET['isPaymentStep']),
'genders' => Gender::getGenders(),
));
/* Call a hook to display more information on form */
$this->context->smarty->assign(array(
'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'),
'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop')
));
+3 -3
View File
@@ -206,14 +206,14 @@ $(function(){ldelim}
<textarea id="other" name="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{else}{if isset($address->other)}{$address->other}{/if}{/if}</textarea>
</p>
{if $one_phone_at_least}
<p class="inline-infos required">{l s='You must register at least one phone number.'} <sup class="required">*</sup></p>
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p>
{/if}
<p class="text">
<label for="phone">{l s='Home phone'}</label>
<input type="text" id="phone" name="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{else}{if isset($address->phone)}{$address->phone}{/if}{/if}" />
</p>
<p class="text">
<label for="phone_mobile">{l s='Mobile phone'}</label>
<p class="{if $one_phone_at_least}required {/if}text">
<label for="phone_mobile">{l s='Mobile phone'}{if $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{if isset($address->phone_mobile)}{$address->phone_mobile}{/if}{/if}" />
</p>
<p class="required text" id="adress_alias">
+2 -2
View File
@@ -551,8 +551,8 @@ $(document).ready(function() {
<label for="phone">{l s='Home phone'}</label>
<input type="text" class="text" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
</p>
<p class="text">
<label for="phone_mobile">{l s='Mobile phone'} {if $one_phone_at_least}<sup>*</sup>{/if}</label>
<p class="{if $one_phone_at_least}required {/if} text">
<label for="phone_mobile">{l s='Mobile phone'}{if $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" class="text" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
</p>
<p class="required text" id="address_alias">
+2 -7
View File
@@ -68,14 +68,9 @@
font-size: 12px;
color:#666;
}
#account-creation_form span.form_info {
#account-creation_form span.form_info, #account-creation_form p.inline-infos {
display:block;
margin:5px 0 0 265px;
color:#666;
}
#account-creation_form p.inline-infos {
margin:0 0 0 100px !important;
font-size:12px;
margin:5px 0 0 265px!important;
color:#666;
}
#account-creation_form .id_state, #account-creation_form .dni, #account-creation_form .postcode {
+1 -1
View File
@@ -1403,7 +1403,7 @@ a.iframe {font-weight:bold}
#addresses #center_column{width:757px}
#address p.inline-infos {
margin:0 0 0 100px !important;
margin:0 0 0 265px !important;
font-size:12px;
color:#666;
}
+3 -3
View File
@@ -70,9 +70,9 @@
color:#666
}
#new_account_form span.form_info,
#new_account_form span.inline-infos {
#new_account_form span.inline-infos, #new_account_form p.inline-infos {
display:block;
margin:5px 0 0 265px;
margin:5px 0 0 265px!important;
color:#666
}
#new_account_form .id_state, #new_account_form .dni, #new_account_form .postcode {
@@ -87,4 +87,4 @@
float: right;
margin-right: 20px;
padding: 0;
}
}
+12 -6
View File
@@ -259,12 +259,15 @@
<label for="other">{l s='Additional information'}</label>
<textarea name="other" id="other" cols="26" rows="3"></textarea>
</p>
<p class="required text">
{if $one_phone_at_least}
<p class="inline-infos required is_customer_param">{l s='You must register at least one phone number.'}</p>
{/if}
<p class="text is_customer_param">
<label for="phone">{l s='Home phone'}</label>
<input type="text" class="text" name="phone" id="phone" value="{if isset($guestInformations) && $guestInformations.phone}{$guestInformations.phone}{/if}" />
</p>
<p class="text is_customer_param">
<label for="phone_mobile">{l s='Mobile phone'}</label>
<p class="{if $one_phone_at_least}required {/if}text">
<label for="phone_mobile">{l s='Mobile phone'}{if $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" class="text" name="phone_mobile" id="phone_mobile" value="" />
</p>
<input type="hidden" name="alias" id="alias" value="{l s='My address'}" />
@@ -357,12 +360,15 @@
<label for="other_invoice">{l s='Additional information'}</label>
<textarea name="other_invoice" id="other_invoice" cols="26" rows="3"></textarea>
</p>
<p class="required text">
{if $one_phone_at_least}
<p class="inline-infos required">{l s='You must register at least one phone number.'}</p>
{/if}
<p class="text">
<label for="phone_invoice">{l s='Home phone'}</label>
<input type="text" class="text" name="phone_invoice" id="phone_invoice" value="" />
</p>
<p class="text is_customer_param">
<label for="phone_mobile_invoice">{l s='Mobile phone'}</label>
<p class="{if $one_phone_at_least}required {/if}text is_customer_param">
<label for="phone_mobile_invoice">{l s='Mobile phone'}{if $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" class="text" name="phone_mobile_invoice" id="phone_mobile_invoice" value="" />
</p>
<input type="hidden" name="alias_invoice" id="alias_invoice" value="{l s='My Invoice address'}" />