[mod] conf:vars for registration defaults [mod] page:registration:use defaults from conf
This commit is contained in:
parent
a28c715c15
commit
3bb6cc7a6c
2 changed files with 13 additions and 3 deletions
|
@ -28,6 +28,10 @@ namespace _espe.conf
|
||||||
settings : {
|
settings : {
|
||||||
title : string;
|
title : string;
|
||||||
test_mode : boolean;
|
test_mode : boolean;
|
||||||
|
registration_defaults : {
|
||||||
|
email_address : ("none" | "only_veiled" | "both");
|
||||||
|
email_redirect : boolean;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +59,7 @@ namespace _espe.conf
|
||||||
(node_backend => ({
|
(node_backend => ({
|
||||||
"scheme": (node_backend["scheme"] ?? "http"),
|
"scheme": (node_backend["scheme"] ?? "http"),
|
||||||
"host": (node_backend["host"] ?? "localhost"),
|
"host": (node_backend["host"] ?? "localhost"),
|
||||||
"port": (node_backend["port"] ?? 7979),
|
"port": (node_backend["port"] ?? 4916),
|
||||||
"path_base": (node_backend["path_base"] ?? ""),
|
"path_base": (node_backend["path_base"] ?? ""),
|
||||||
})) (data_raw["backend"] ?? {})
|
})) (data_raw["backend"] ?? {})
|
||||||
),
|
),
|
||||||
|
@ -63,6 +67,12 @@ namespace _espe.conf
|
||||||
(node_settings => ({
|
(node_settings => ({
|
||||||
"title": (node_settings["title"] ?? "Espe"),
|
"title": (node_settings["title"] ?? "Espe"),
|
||||||
"test_mode": (node_settings["test_mode"] ?? false),
|
"test_mode": (node_settings["test_mode"] ?? false),
|
||||||
|
"registration_defaults": (
|
||||||
|
(node_settings_registration_defaults => ({
|
||||||
|
"email_address": (node_settings_registration_defaults["email_address"] ?? "both"),
|
||||||
|
"email_redirect": (node_settings_registration_defaults["email_redirect"] ?? true),
|
||||||
|
})) (data_raw["registration_defaults"] ?? {})
|
||||||
|
),
|
||||||
})) (data_raw["settings"] ?? {})
|
})) (data_raw["settings"] ?? {})
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
|
@ -146,8 +146,8 @@ lib_plankton.zoo_page.register(
|
||||||
await input.setup(target_element.querySelector(".register-form-input") as HTMLElement);
|
await input.setup(target_element.querySelector(".register-form-input") as HTMLElement);
|
||||||
await input.write(
|
await input.write(
|
||||||
{
|
{
|
||||||
"email_address": "both",
|
"email_address": _espe.conf.get().settings.registration_defaults.email_address,
|
||||||
"email_redirect": true,
|
"email_redirect": _espe.conf.get().settings.registration_defaults.email_redirect,
|
||||||
"password_value": "",
|
"password_value": "",
|
||||||
"password_confirmation": "",
|
"password_confirmation": "",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue