Browse Source

UI-1289: Now placing masks in i18n files

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

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

@ -530,7 +530,10 @@
"title": "Select your new Main Extension",
"header": "It appears that you want to remove the number you had set as your Main Extension. Please select your new Main Extension from the choices below:",
"none": "I don't want to set a new Main Extension"
}
},
"__comment": "UI-1289: Masks should be in i18n",
"__version": "v3.20_s3",
"defaultPhoneMask": "+1 (999) 999-9999"
},
"strategy": {


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

@ -506,7 +506,10 @@
"title": "Sélectionnez votre Extension Principale",
"header": "Vous êtes en train de supprimer l'Extension Principale de cet utilisateur, veuillez en sélectionner une nouvelle dans les options ci-dessous:",
"none": "Je ne veux pas d'Extension Principale"
}
},
"__comment": "UI-1289: Masks should be in i18n",
"__version": "v3.20_s3",
"defaultPhoneMask": "+1 (999) 999-9999"
},
"strategy": {


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

@ -1853,14 +1853,6 @@ define(function(require){
data.value ? featureTemplate.find('.content').slideDown() : featureTemplate.find('.content').slideUp();
});
featureTemplate.find('#phoneType').on('change', function() {
if ( $(this).val() === 'mobile' ) {
featureTemplate.find('#number').mask('+1 (999) 999-9999');
} else if ( $(this).val() === 'deskphone' ) {
featureTemplate.find('#number').mask('(999) 999-9999');
}
});
featureTemplate.find('.save').on('click', function() {
if(monster.ui.valid(featureForm)) {
var formData = monster.ui.getFormData('call_forward_form');
@ -1886,12 +1878,12 @@ define(function(require){
if (currentUser.hasOwnProperty('call_forward') && currentUser.call_forward.number && /^(\+1)/.test(currentUser.call_forward.number)) {
featureTemplate.find('#phoneType').val('mobile');
featureTemplate.find('#number').mask('+1 (999) 999-9999');
} else {
featureTemplate.find('#phoneType').val('deskphone');
featureTemplate.find('#number').mask('(999) 999-9999');
}
featureTemplate.find('#number').mask(self.i18n.active().users.defaultPhoneMask);
var popup = monster.ui.dialog(featureTemplate, {
title: currentUser.extra.mapFeatures.call_forward.title,
position: ['center', 20]


Loading…
Cancel
Save