From 6fb37b2374f8b5018cfe7f76d111a1acaa8de788 Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 21 Feb 2024 23:51:39 +0700 Subject: [PATCH] Test --- config_panel.toml | 7 ++++--- scripts/config | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index a59aaa3..320b64c 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -9,9 +9,10 @@ services = [ 'php8.3-fpm'] [main.comptes.creation_compte] ask.en = "Enable account creation" ask.fr = "Permettre la création de nouveaux comptes" - type = "select" - choices = ["true", "false"] - default = "true" + type = "boolean" + yes = true + no = false + default = true help = "Don't disable account creation before creating one for yourself !" [main.comptes.connexion_compte] diff --git a/scripts/config b/scripts/config index e271b78..6e23c85 100644 --- a/scripts/config +++ b/scripts/config @@ -30,6 +30,7 @@ get__csv_sep(){ set__csv_sep(){ sed -i "s/define(\"CSV_SEP\",.*);/define(\"CSV_SEP\", \"$csv_sep\");/" "$install_dir/config.php" + } get__creation_compte(){ @@ -37,7 +38,7 @@ get__creation_compte(){ } set__creation_compte(){ - sed -i "s/define(\"CREATION_COMPTE\",.*);/define(\"CREATION_COMPTE\", \"$creation_compte\");/" "$install_dir/config.php" + sed -i "s/define(\"CREATION_COMPTE\",.*);/define(\"CREATION_COMPTE\", $creation_compte);/" "$install_dir/config.php" } get__connexion_compte(){ @@ -45,7 +46,7 @@ get__connexion_compte(){ } set__connexion_compte(){ - sed -i "s/define(\"CONNEXION_COMPTE\",.*);/define(\"CONNEXION_COMPTE\", \"$connexion_compte\");/" "$install_dir/config.php" + sed -i "s/define(\"CONNEXION_COMPTE\",.*);/define(\"CONNEXION_COMPTE\", $connexion_compte);/" "$install_dir/config.php" }