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['data-dependence-option'] = h($fieldData['stateDependence']['option']);
|
||||||
}
|
}
|
||||||
$controlParams['id'] = $fieldData['field'] . '-field';
|
$controlParams['id'] = $fieldData['field'] . '-field';
|
||||||
|
if (!empty($fieldData['autocomplete'])) {
|
||||||
|
$controlParams['autocomplete'] = $fieldData['autocomplete'];
|
||||||
|
}
|
||||||
$formFieldElement = $form->control($fieldData['field'], $controlParams);
|
$formFieldElement = $form->control($fieldData['field'], $controlParams);
|
||||||
if (!empty($fieldData['hidden'])) {
|
if (!empty($fieldData['hidden'])) {
|
||||||
$formFieldElement = '<span class="hidden">' . $formFieldElement . '</span>';
|
$formFieldElement = '<span class="hidden">' . $formFieldElement . '</span>';
|
||||||
|
|
|
@ -11,19 +11,22 @@
|
||||||
'options' => $dropdownData['individual']
|
'options' => $dropdownData['individual']
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'field' => 'username'
|
'field' => 'username',
|
||||||
|
'autocomplete' => 'off'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'field' => 'password',
|
'field' => 'password',
|
||||||
'label' => __('Password'),
|
'label' => __('Password'),
|
||||||
'type' => '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',
|
'field' => 'confirm_password',
|
||||||
'label' => __('Confirm Password'),
|
'label' => __('Confirm Password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'required' => $this->request->getParam('action') === 'add' ? 'required' : false
|
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
|
||||||
|
'autocomplete' => 'off'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'field' => 'role_id',
|
'field' => 'role_id',
|
||||||
|
|
Loading…
Reference in New Issue