Browse Source

UI-1033: Now properly removes the Caller-ID feature if the number is un-assigned from that user

4.3
Jean-Roch Maitre 11 years ago
parent
commit
cdc6e4ab84
3 changed files with 28 additions and 4 deletions
  1. +4
    -1
      i18n/en-US.json
  2. +4
    -1
      i18n/fr-FR.json
  3. +20
    -2
      submodules/users/users.js

+ 4
- 1
i18n/en-US.json View File

@ -425,7 +425,10 @@
"passwordReseted": "The password has been reset, an e-mail has been sent to {{ email }} with instructions on how to create a new password.",
"userDelete": "You successfully deleted {{ name }} from the Smart PBX!",
"userUpdated": "You successfully updated {{ name }} settings.",
"pinUpdated": "You successfully updated the PIN of {{ name }}."
"pinUpdated": "You successfully updated the PIN of {{ name }}.",
"__comment": "UI-1033: Now properly remove the Caller-ID Feature if we remove a number that was set as that Caller-ID Number",
"__version": "3.20",
"callerIDDeleted": "The Caller-ID Number of this user was set to a number that was no longer assigned to him, so we disabled the Caller-ID Feature."
},
"uploadPicture": "Upload a Picture",
"user": "User",


+ 4
- 1
i18n/fr-FR.json View File

@ -400,7 +400,10 @@
"passwordReseted": "Le mot de passe a été réinitialisé, un email a été envoyé à {{email}} avec les instructions pour créer un nouveau mot de passe.",
"userDelete": "Vous avez supprimé {{ name }} avec succès!",
"userUpdated": "Vous avez mis à jour {{ name }} avec succès!",
"pinUpdated": "Vous avez mis à jour le PIN de {{ name }} avec succès!"
"pinUpdated": "Vous avez mis à jour le PIN de {{ name }} avec succès!",
"__comment": "UI-1033: Now properly remove the Caller-ID Feature if we remove a number that was set as that Caller-ID Number",
"__version": "3.20",
"callerIDDeleted": "Le Numéro de Caller-ID de cet utilisateur n'étant plus assigné, la fonctionnalité Caller-ID a été desactivée."
},
"uploadPicture": "Uploader une image",
"user": "Utilisateur",


+ 20
- 2
submodules/users/users.js View File

@ -1053,9 +1053,27 @@ define(function(require){
if(dataNumbers.length > 0) {
self.usersUpdateCallflowNumbers(userId, (currentCallflow || {}).id, dataNumbers, function(callflowData) {
toastr.success(monster.template(self, '!' + toastrMessages.numbersUpdated, { name: name }));
var afterUpdate = function() {
toastr.success(monster.template(self, '!' + toastrMessages.numbersUpdated, { name: name }));
self.usersRender({ userId: callflowData.owner_id });
};
// If the User has the External Caller ID Number setup to a number that is no longer assigned to this user, then remove the Caller-ID Feature
if(currentUser.caller_id.hasOwnProperty('external')
&& currentUser.caller_id.external.hasOwnProperty('number')
&& callflowData.numbers.indexOf(currentUser.caller_id.external.number) < 0) {
delete currentUser.caller_id.external.number;
self.usersRender({ userId: callflowData.owner_id });
self.usersUpdateUser(currentUser, function() {
afterUpdate();
toastr.info(toastrMessages.callerIDDeleted);
});
}
else {
afterUpdate();
}
});
}
else {


Loading…
Cancel
Save