chg: [user add] don't autocomplete username/password fields
parent
1d611b2df8
commit
76883145fb
|
@ -13,6 +13,9 @@ class FormFieldMassageHelper extends Helper
|
|||
$controlParams['data-dependence-option'] = h($fieldData['stateDependence']['option']);
|
||||
}
|
||||
$controlParams['id'] = $fieldData['field'] . '-field';
|
||||
if (!empty($fieldData['autocomplete'])) {
|
||||
$controlParams['autocomplete'] = $fieldData['autocomplete'];
|
||||
}
|
||||
$formFieldElement = $form->control($fieldData['field'], $controlParams);
|
||||
if (!empty($fieldData['hidden'])) {
|
||||
$formFieldElement = '<span class="hidden">' . $formFieldElement . '</span>';
|
||||
|
|
|
@ -11,19 +11,22 @@
|
|||
'options' => $dropdownData['individual']
|
||||
],
|
||||
[
|
||||
'field' => 'username'
|
||||
'field' => 'username',
|
||||
'autocomplete' => 'off'
|
||||
],
|
||||
[
|
||||
'field' => 'password',
|
||||
'label' => __('Password'),
|
||||
'type' => 'password',
|
||||
'required' => $this->request->getParam('action') === 'add' ? 'required' : false
|
||||
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
|
||||
'autocomplete' => 'new-password'
|
||||
],
|
||||
[
|
||||
'field' => 'confirm_password',
|
||||
'label' => __('Confirm Password'),
|
||||
'type' => 'password',
|
||||
'required' => $this->request->getParam('action') === 'add' ? 'required' : false
|
||||
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
|
||||
'autocomplete' => 'off'
|
||||
],
|
||||
[
|
||||
'field' => 'role_id',
|
||||
|
|
Loading…
Reference in New Issue