Issue #2569281 by iMiksu, dawehner, lauriii, alexpott, joelpittet, xjm: Change...
Issue #2569281 by iMiksu, dawehner, lauriii, alexpott, joelpittet, xjm: Change translatable string with !placeholder AccountForm to use a URL instead of a generated link and provide better context
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$request_new=$this->l($this->t('Reset your password'),newUrl('user.pass',
array(),array('attributes'=>array('title'=>$this->t('Send password reset instructions via e-mail.'))))
);
$current_pass_description=$this->t('Required if you want to change the %mail or %pass below. !request_new.',
array(
'%mail'=>$protected_values['mail'],
'%pass'=>$protected_values['pass'],
'!request_new'=>$request_new,
)
);
}
// The user must enter their current password to change to a new one.
if($user->id()==$account->id()){
$form['account']['current_pass']=array(
'#type'=>'password',
'#title'=>$this->t('Current password'),
'#size'=>25,
'#access'=>!empty($protected_values),
'#description'=>$current_pass_description,
'#access'=>!$form_state->get('user_pass_reset'),
'#weight'=>-5,
// Do not let web browsers remember this password, since we are
// trying to confirm that the person submitting the form actually
// knows the current one.
'#attributes'=>array('autocomplete'=>'off'),
);
$form_state->set('user',$account);
// The user may only change their own password without their current
// password if they logged in via a one-time login link.
if(!$form_state->get('user_pass_reset')){
$form['account']['current_pass']['#description']=$this->t('Required if you want to change the %mail or %pass below. <a href="!request_new_url" title="Send password reset instructions via e-mail.">Reset your password</a>.',array(