mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
add 'list_portal' AppOption modifier to add portal as a possible choice
This commit is contained in:
parent
0645d18e67
commit
5562b61db0
2 changed files with 4 additions and 0 deletions
|
@ -382,6 +382,7 @@ class ConfigPanel:
|
|||
"filter",
|
||||
"readonly",
|
||||
"enabled",
|
||||
"list_portal",
|
||||
# "confirm", # TODO: to ask confirmation before running an action
|
||||
],
|
||||
"defaults": {},
|
||||
|
|
|
@ -914,6 +914,7 @@ class AppOption(BaseChoicesOption):
|
|||
|
||||
super().__init__(question)
|
||||
self.filter = question.get("filter", None)
|
||||
self.list_portal = question.get("list_portal", False)
|
||||
|
||||
apps = app_list(full=True)["apps"]
|
||||
|
||||
|
@ -929,6 +930,8 @@ class AppOption(BaseChoicesOption):
|
|||
return app["label"] + domain_path_or_id
|
||||
|
||||
self.choices = {"_none": "---"}
|
||||
if self.list_portal:
|
||||
self.choices["portal_public_apps"] = "Portal"
|
||||
self.choices.update({app["id"]: _app_display(app) for app in apps})
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue