Skip to content

Commit

Permalink
Adding admin class for password input type. Removing duplcated classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard13 committed Dec 5, 2019
1 parent 3a2561d commit 67c55ec
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Backend/Block/System/Account/Edit/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function _prepareForm()
'name' => 'password',
'label' => __('New Password'),
'title' => __('New Password'),
'class' => 'validate-admin-password admin__control-text'
'class' => 'validate-admin-password'
]
);

Expand All @@ -124,7 +124,7 @@ protected function _prepareForm()
[
'name' => 'password_confirmation',
'label' => __('Password Confirmation'),
'class' => 'validate-cpassword admin__control-text'
'class' => 'validate-cpassword'
]
);

Expand Down Expand Up @@ -152,7 +152,7 @@ protected function _prepareForm()
'label' => __('Your Password'),
'id' => self::IDENTITY_VERIFICATION_PASSWORD_FIELD,
'title' => __('Your Password'),
'class' => 'validate-current-password required-entry admin__control-text',
'class' => 'validate-current-password required-entry',
'required' => true
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected function _addGeneralFieldset($form, $integrationData)
'label' => __('Your Password'),
'id' => self::DATA_CONSUMER_PASSWORD,
'title' => __('Your Password'),
'class' => 'input-text validate-current-password required-entry',
'class' => 'validate-current-password required-entry',
'required' => true
]
);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/User/Block/Role/Tab/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function _initForm()
'label' => __('Your Password'),
'id' => self::IDENTITY_VERIFICATION_PASSWORD_FIELD,
'title' => __('Your Password'),
'class' => 'input-text validate-current-password required-entry',
'class' => 'validate-current-password required-entry',
'required' => true
]
);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/User/Block/User/Edit/Tab/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected function _prepareForm()
'label' => __('Your Password'),
'id' => self::CURRENT_USER_PASSWORD_FIELD,
'title' => __('Your Password'),
'class' => 'input-text validate-current-password required-entry',
'class' => 'validate-current-password required-entry',
'required' => true
]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

use Magento\Framework\Escaper;

/**
* Class Password
*
* Password input type
*/
class Password extends AbstractElement
{
/**
Expand All @@ -37,7 +42,7 @@ public function __construct(
*/
public function getHtml()
{
$this->addClass('input-text');
$this->addClass('input-text admin__control-text');
return parent::getHtml();
}
}

0 comments on commit 67c55ec

Please sign in to comment.