mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Avoid empty fields at postinstall #30.
This commit is contained in:
parent
296d0937ff
commit
8cabcc543f
3 changed files with 7 additions and 2 deletions
|
@ -354,7 +354,10 @@ app = Sammy('#main', function (sam) {
|
|||
});
|
||||
|
||||
sam.post('#/postinstall', function (c) {
|
||||
if (c.params['password'] == c.params['confirmation']) {
|
||||
if (c.params['password'] == '' || c.params['confirmation'] == '') {
|
||||
c.flash('fail', y18n.t('password_empty'))
|
||||
}
|
||||
else if (c.params['password'] == c.params['confirmation']) {
|
||||
if (c.params['domain'] == '') {
|
||||
if (c.params['ddomain'] == '') {
|
||||
c.flash('fail', y18n.t('error_select_domain'));
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
"wrong_password" : "Wrong password",
|
||||
"passwords_dont_match" : "Passwords don't match",
|
||||
"passwords_too_short" : "Password is too short",
|
||||
"password_empty" : "Password field is empty",
|
||||
"logged_in" : "Logged in",
|
||||
"logged_out" : "Logged out",
|
||||
"error_occured" : "An error occured, try again",
|
||||
|
|
|
@ -42,11 +42,12 @@
|
|||
"wrong_password" : "Mot de passe incorrect",
|
||||
"passwords_dont_match" : "Les mots de passe ne correspondent pas",
|
||||
"passwords_too_short" : "Mot de passe trop court",
|
||||
"password_empty" : "Le champ mot de passe est vide",
|
||||
"logged_in" : "Connecté",
|
||||
"logged_out" : "Déconnecté",
|
||||
"error_occured" : "Une erreur est survenue, veuillez réessayer.",
|
||||
"error_server" : "Erreur serveur",
|
||||
"error_select_domain" : "Vous devez indiquer une domaine.",
|
||||
"error_select_domain" : "Vous devez indiquer un domaine.",
|
||||
"error_modify_something" : "Vous devez modifier quelque chose.",
|
||||
"non_compatible_api" : "API Non compatible",
|
||||
"warning_first_user" : "Vous devez probablement d'abord <a href='#/users/create' class='alert-link'>créer un utilisateur</a>.",
|
||||
|
|
Loading…
Reference in a new issue