LSformElement::password: Add confirmChangeQuestion parameter

This commit is contained in:
Benjamin Renard 2020-06-13 10:14:16 +02:00
parent c0f0a0645c
commit 079f39ab4b
5 changed files with 20 additions and 2 deletions

View file

@ -25,6 +25,7 @@
'verify' => [booléen], // Activation de l'outil de vérification du mot de passe
'viewHash' => [booléen], // Activation de l'outil de visualisation du mot de passe haché
'confirmChange' => [booléen], // Activation de la confirmation en cas de changement du mot de passe
'confirmChangeQuestion' => "[LSformat]", // LSformat de la question de confirmation du changement du mot de passe
'mail' => array( // Configuration de l'envoi du mot de passe par mail
'subject' => "[LSformat du sujet du mail]",
'msg' => "[LSformat du message du mail]",
@ -140,6 +141,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>confirmChangeQuestion</term>
<listitem>
<simpara>&LSformat; de la question posée à l'utilisateur en cas de changement
du mot de passe et si la fonctionnalité est activée. Il sera composé à l'aide
du <emphasis>label</emphasis> de l'attribut. <emphasis>Paramètre facultatif.
</emphasis></simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>clearView</term>
<listitem>

View file

@ -571,7 +571,9 @@ $GLOBALS['LSobjects']['LSpeople'] = array (
'subject' => "LSexample : Your new credentials.",
'msg' => "Your password has been changed.\nLogin : %{uid}\nNew password : %{password}",
'mail_attr' => 'mail'
)
),
'confirmChange' => True,
'confirmChangeQuestion' => "Do you confirm change of this user's password?",
),
'check_data' => array(
'password' => array(

View file

@ -158,7 +158,7 @@ class LSformElement_password extends LSformElement {
);
if ($params['confirmChange']) {
$params['confirmChangeQuestion'] = getFData(_('%{label}: Do you confirm the password change?'), $this -> label);
$params['confirmChangeQuestion'] = getFData(__($this -> getParam('html_options.confirmChangeQuestion', '%{label}: Do you confirm the password change?')), $this -> label);
}
if ($this -> getParam('html_options.mail')) {

View file

@ -570,6 +570,7 @@ function cli_generate_lang_file($command_args) {
case 'password':
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.subject");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.mail.msg");
addFromLSconfig("LSobjects.$obj.attrs.$attr.html_options.confirmChangeQuestion");
break;
case 'select_list':
case 'select_box':

View file

@ -45,6 +45,10 @@ $GLOBALS['LSlang'] = array (
"Description" =>
"Description",
# LSobjects.LSpeople.attrs.userPassword.html_options.confirmChangeQuestion
"Do you confirm change of this user's password?" =>
"Confirmez-vous le changement du mot de passe de cet utilisateur ?",
# LSobjects.LSpeople.LSrelation.groups.emptyText
# LSobjects.LSsysaccount.LSrelation.groups.emptyText
"Doesn't belong to any group." =>