1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moncycle_ynh.git synced 2024-09-03 19:46:16 +02:00

Test select instead of boolean

This commit is contained in:
Limezy 2024-02-21 16:35:36 +07:00
parent 433794840a
commit aecee9186c
2 changed files with 6 additions and 8 deletions

View file

@ -8,20 +8,18 @@ name = "Moncycle.app configuration"
[main.comptes.creation_compte] [main.comptes.creation_compte]
ask.en = "Enable account creation" ask.en = "Enable account creation"
ask.fr = "Permettre la création de nouveaux comptes" ask.fr = "Permettre la création de nouveaux comptes"
type = "boolean" type = "select"
choices = ["true", "false"]
default = "true" default = "true"
yes = "true"
no = "false"
help = "Don't disable account creation before creating one for yourself !" help = "Don't disable account creation before creating one for yourself !"
bind = "CREATION_COMPTE:__INSTALL_DIR__/config.php" bind = "CREATION_COMPTE:__INSTALL_DIR__/config.php"
[main.comptes.connexion_compte] [main.comptes.connexion_compte]
ask.en = "Enable account connexion" ask.en = "Enable account connexion"
ask.fr = "Permettre la connexion aux comptes" ask.fr = "Permettre la connexion aux comptes"
type = "boolean" type = "select"
choices = ["true", "false"]
default = "true" default = "true"
yes = "true"
no = "false"
bind = "CONNEXION_COMPTE:__INSTALL_DIR__/config.php" bind = "CONNEXION_COMPTE:__INSTALL_DIR__/config.php"
[main.export] [main.export]

View file

@ -17,13 +17,13 @@ upgrade_type=$(ynh_check_app_version_changed)
# If creation_compte doesn't exist, create it # If creation_compte doesn't exist, create it
if [ -z "${creation_compte:-}" ]; then if [ -z "${creation_compte:-}" ]; then
creation_compte=true creation_compte="true"
ynh_app_setting_set --app=$app --key=creation_compte --value=$creation_compte ynh_app_setting_set --app=$app --key=creation_compte --value=$creation_compte
fi fi
# If connexion_compte doesn't exist, create it # If connexion_compte doesn't exist, create it
if [ -z "${connexion_compte:-}" ]; then if [ -z "${connexion_compte:-}" ]; then
connexion_compte=true connexion_compte="true"
ynh_app_setting_set --app=$app --key=connexion_compte --value=$connexion_compte ynh_app_setting_set --app=$app --key=connexion_compte --value=$connexion_compte
fi fi