Browse Source

UI-1622: Added validation to user creation / update in smartpbx

4.3
Jean-Roch Maitre 11 years ago
parent
commit
82ba80e890
7 changed files with 29 additions and 9 deletions
  1. +2
    -2
      i18n/en-US.json
  2. +2
    -2
      i18n/fr-FR.json
  3. +2
    -2
      i18n/ru-RU.json
  4. +10
    -1
      submodules/users/users.css
  5. +11
    -0
      submodules/users/users.js
  6. +1
    -1
      views/users-changePassword.html
  7. +1
    -1
      views/users-creation.html

+ 2
- 2
i18n/en-US.json View File

@ -387,7 +387,7 @@
"dialogChangePassword": {
"help": "You can set a new password by just typing any password you want, along with the Email address!",
"password": "Password",
"passwordPlaceholder": "Password (Min. 8 characters)",
"passwordPlaceholder": "Password (Min. 6 characters)",
"title": "Update Email and password",
"username": "User's Email address"
},
@ -406,7 +406,7 @@
"lastName": "Last Name",
"loginEmail": "Email used for Login",
"notificationEmail": "Notification E-mail",
"password": "Password (Min. 8 characters)",
"password": "Password (Min. 6 characters)",
"sendToDifferentEmail": "Send emails to an alternate address",
"title": "Create User",
"vmboxAlreadyExist": "VMBox Number is already taken, please choose a different Voicemail Box Number.",


+ 2
- 2
i18n/fr-FR.json View File

@ -357,7 +357,7 @@
"dialogChangePassword": {
"help": "Vous pouvez mettre à jour votre mot de passe en tapant votre Email et le nouveau mot de passe ci-dessus!",
"password": "Mot de passe",
"passwordPlaceholder": "(Min. 8 caractères)",
"passwordPlaceholder": "(Min. 6 caractères)",
"title": "Mettre à jour Email / Mot de passe",
"username": "Email de l'utilisateur"
},
@ -376,7 +376,7 @@
"lastName": "Nom",
"loginEmail": "Email/Login de l'utilisateur",
"notificationEmail": "Email pour notifications",
"password": "(Min. 8 caractères)",
"password": "(Min. 6 caractères)",
"sendToDifferentEmail": "Envoyer les emails à une autre adresse",
"title": "Créer Utilisateur",
"vmboxAlreadyExist": "Le numéro de répondeur existe déjà, veuillez en choisir un autre.",


+ 2
- 2
i18n/ru-RU.json View File

@ -376,7 +376,7 @@
"dialogChangePassword": {
"help": "Вы можете установить новый пароль введя любой пароль, а так же и новый адрес электронной почты!",
"password": "Пароль",
"passwordPlaceholder": "Пароль (Мин. 8 знаков)",
"passwordPlaceholder": "Пароль (Мин. 6 знаков)",
"title": "Изменение Email и паролья",
"username": "Email пользователя"
},
@ -395,7 +395,7 @@
"lastName": "Фамилия",
"loginEmail": "Email пользователя для входа в систему",
"notificationEmail": "E-mail для отпавки уведомлений",
"password": "Пароль (Мин. 8 знаков)",
"password": "Пароль (Мин. 6 знаков)",
"sendToDifferentEmail": "Отправлять сообщения на альтернативный Email",
"title": "Создание пользователя",
"vmboxAlreadyExist": "Голосовой ящик уже выбран, пожалуйта выберите номер другого голосового почтового ящика.",


+ 10
- 1
submodules/users/users.css View File

@ -597,7 +597,11 @@
}
#creation_user_dialog label.monster-invalid[for="extension"] {
margin-left: 156px;
margin-left: 160px;
}
#creation_user_dialog label.monster-invalid[for="password"] {
margin-top: 25px;
}
#creation_user_dialog .control-group.hack-left .control-label{
@ -647,6 +651,11 @@
width: 153px;
}
/* Change Password Popup */
.change-password-popup label.monster-invalid[for="inputPassword"] {
margin-top: 25px;
}
/* Caller-ID User Feature Popup */
.feature-popup-container[data-feature="caller_id"] {
width: 525px;


+ 11
- 0
submodules/users/users.js View File

@ -588,6 +588,9 @@ define(function(require){
},
'vmbox.number': {
checkList: originalData.listVMBoxes
},
'user.password': {
minlength: 6
}
},
messages: {
@ -860,6 +863,14 @@ define(function(require){
monster.ui.showPasswordStrength(passwordTemplate.find('#inputPassword'));
monster.ui.validate(form, {
rules: {
'password': {
minlength: 6
}
}
});
passwordTemplate.find('.save-new-username').on('click', function() {
var formData = monster.ui.getFormData('form_new_username'),
userToSave = $.extend(true, {}, currentUser, formData);


+ 1
- 1
views/users-changePassword.html View File

@ -10,7 +10,7 @@
<div class="control-group">
<label class="control-label" for="inputPassword">{{ i18n.users.dialogChangePassword.password }}</label>
<div class="controls">
<input name="password" type="password" id="inputPassword" placeholder="{{ i18n.users.dialogChangePassword.passwordPlaceholder }}">
<input required name="password" type="password" id="inputPassword" placeholder="{{ i18n.users.dialogChangePassword.passwordPlaceholder }}">
</div>
</div>
</form>


+ 1
- 1
views/users-creation.html View File

@ -19,7 +19,7 @@
<div class="control-group">
<label class="control-label" for="password"><i class="fa fa-unlock"></i></label>
<div class="controls">
<input type="password" name="user.password" id="password" placeholder="{{i18n.users.dialogCreationUser.password}}"/>
<input required type="password" name="user.password" id="password" placeholder="{{i18n.users.dialogCreationUser.password}}"/>
</div>
</div>
</div>


Loading…
Cancel
Save