update customer forms

This commit is contained in:
Shreesh Arora
2024-10-04 20:13:06 +05:30
parent 9ee7154bd9
commit 6b2d569621
3 changed files with 3 additions and 2 deletions

View File

@@ -440,7 +440,7 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Phone'),
'name' => 'phone',
'col' => '4',
'required' => true,
'required' => Configuration::get('PS_ONE_PHONE_AT_LEAST') ? true : false,
'autocomplete' => false
),
array(

View File

@@ -165,6 +165,7 @@ class IdentityControllerCore extends FrontController
'sl_day' => $birthday[2],
'errors' => $this->errors,
'genders' => Gender::getGenders(),
'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
));
// Call a hook to display more information

View File

@@ -90,7 +90,7 @@
<input class="is_required validate form-control" data-validate="isEmail" type="email" name="email" id="email" value="{$smarty.post.email}" />
</div>
<div class="required form-group">
<label for="phone" class="required">
<label for="phone" {if isset($one_phone_at_least) && $one_phone_at_least}class="required"{/if}>
{l s='Phone'}
</label>
<input class="is_required validate form-control" data-validate="isPhoneNumber" type="phone" name="phone" id="phone" value="{$smarty.post.phone}" />