This commit is contained in:
likeitneverwentaway 2016-12-11 17:55:03 +00:00 committed by GitHub
commit 3774de8c96
2 changed files with 9 additions and 1 deletions

View file

@ -86,6 +86,7 @@
"domain_unknown": "Domaine inconnu",
"domain_zone_exists": "Le fichier de zone DNS existe déjà",
"domain_zone_not_found": "Fichier de zone DNS introuvable pour le domaine {:s}",
"domains_available": "Domaines disponibles :",
"done": "Terminé.",
"downloading": "Téléchargement...",
"dyndns_cron_installed": "La tâche cron pour le domaine DynDNS a été installée",

View file

@ -1497,7 +1497,7 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
args -- A dictionnary of arguments to parse
"""
from yunohost.domain import domain_list
from yunohost.domain import domain_list, _get_maindomain
from yunohost.user import user_info
args_dict = OrderedDict()
@ -1536,6 +1536,13 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
# Check for a password argument
is_password = True if arg_type == 'password' else False
if arg_type == 'domain':
arg_default = _get_maindomain()
ask_string += ' (default: {0})'.format(arg_default)
msignals.display(m18n.n('domains_available'))
for domain in domain_list(auth)['domains']:
msignals.display(domain)
try:
input_string = msignals.prompt(ask_string, is_password)