mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3817 [users] Forget Password - Hide SMS pass reminder if module is not installed
This commit is contained in:
parent
7dd482ce43
commit
0f4b2edb2e
@ -4,6 +4,13 @@ class ForgotPassFormFields
|
||||
{
|
||||
public function handle(ForgotPassFormBuilder $builder)
|
||||
{
|
||||
$resetTypeOptions = [
|
||||
'mail' => 'visiosoft.theme.base::field.mail',
|
||||
];
|
||||
if (is_module_installed('visiosoft.module.sms')) {
|
||||
$resetTypeOptions['sms'] = 'visiosoft.theme.base::field.sms';
|
||||
}
|
||||
|
||||
$builder->setFields(
|
||||
[
|
||||
'email' => [
|
||||
@ -23,10 +30,7 @@ class ForgotPassFormFields
|
||||
"resetType" => [
|
||||
"type" => "anomaly.field_type.select",
|
||||
"config" => [
|
||||
"options" => [
|
||||
'sms' => 'visiosoft.theme.base::field.sms',
|
||||
'mail' => 'visiosoft.theme.base::field.mail',
|
||||
],
|
||||
"options" => $resetTypeOptions,
|
||||
"separator" => ":",
|
||||
"default_value" => 'mail',
|
||||
"mode" => "radio",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user