re #224 add option to require consent

This commit is contained in:
tonydspaniard
2019-08-21 11:13:48 +02:00
parent 07a7a7bda7
commit 5b071dae88
37 changed files with 406 additions and 106 deletions

View File

@ -76,7 +76,7 @@ class RegistrationForm extends Model
'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords],
'passwordLength' => ['password', 'string', 'min' => 6, 'max' => 72],
'gdprType' => ['gdpr_consent', 'boolean'],
'gdprDefault' => ['gdpr_consent', 'default', 'value' => 0,'skipOnEmpty' => false],
'gdprDefault' => ['gdpr_consent', 'default', 'value' => 0, 'skipOnEmpty' => false],
'gdprRequired' => ['gdpr_consent',
'compare',
'compareValue' => true,
@ -103,17 +103,7 @@ class RegistrationForm extends Model
public function attributeHints()
{
return [
'gdpr_consent' => Yii::t(
'usuario',
'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}',
[
'privacyPolicy' => Html::a(
Yii::t('usuario', 'privacy policy'),
$this->module->gdprPrivacyPolicyUrl,
['target' => '_blank']
)
]
)
'gdpr_consent' => $this->module->getConsentMessage()
];
}
}