From d9da9568a1cad75403f45624ecef92cc191c2f68 Mon Sep 17 00:00:00 2001 From: Ramen Romana <78377672+ramandeepromana@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:06:02 -0400 Subject: [PATCH] [5.3] MSPB-253: Revert "Implement 'Always On, Busy, and No Answer' Call Forwarding Feature" (#528) Following a recent team call, it's been decided to revert the changes made to `PS-35` as part of `RELEASE-246`, with a full implementation deferred to future releases. The team discussed various strategies for SmartPBX, ultimately opting for a reversion. --- app.js | 1 - i18n/de-DE.json | 70 +-- i18n/en-US.json | 74 +-- i18n/es-ES.json | 66 +-- i18n/fr-FR.json | 65 +-- i18n/ru-RU.json | 69 +-- style/app.scss | 2 - submodules/users/users.js | 169 ++++-- submodules/users/users.scss | 2 +- .../users/views/feature-call_failover.html | 58 -- .../users/views/feature-call_forward.html | 75 +++ submodules/users/views/features.html | 4 - submodules/users/views/row.html | 8 +- .../usersCallForwarding.js | 520 ------------------ .../usersCallForwarding.scss | 247 --------- .../usersCallForwarding/views/layout.html | 115 ---- .../usersCallForwarding/views/options.html | 24 - .../views/simpleStrategy.html | 121 ---- 18 files changed, 254 insertions(+), 1436 deletions(-) delete mode 100644 submodules/users/views/feature-call_failover.html create mode 100644 submodules/users/views/feature-call_forward.html delete mode 100644 submodules/usersCallForwarding/usersCallForwarding.js delete mode 100644 submodules/usersCallForwarding/usersCallForwarding.scss delete mode 100644 submodules/usersCallForwarding/views/layout.html delete mode 100644 submodules/usersCallForwarding/views/options.html delete mode 100644 submodules/usersCallForwarding/views/simpleStrategy.html diff --git a/app.js b/app.js index 600577db..1319596a 100644 --- a/app.js +++ b/app.js @@ -71,7 +71,6 @@ define(function(require) { 'strategyHours', 'strategyHolidays', 'users', - 'usersCallForwarding', 'vmboxes' ], diff --git a/i18n/de-DE.json b/i18n/de-DE.json index 179cd25c..729692e2 100644 --- a/i18n/de-DE.json +++ b/i18n/de-DE.json @@ -608,64 +608,22 @@ "successResetPassword": "Vorgang erfolgreich durchgeführt! {{ name }} wird in Kürze eine E-Mail erhalten, in der steht, wie er sein Kennwort zurücksetzen kann." }, "uploadPicture": "Ein Bild hochladen", - "callForwarding": { + "user": "Benutzer", + "call_forward": { + "failoverMode": "Im Fehlerfall", + "directCallsOnly": "Nur Direktanrufe weiterleiten", + "headline": "Einstellungen zur Weiterleitung von Benutzeranrufen", + "keepCallerId": "Ursprüngliche Anrufer-ID speichern", + "label": "Alle Anrufe weiterleiten an" , + "placeholder": "+49 123 4567890", + "requireKeyPress": "Sprachnachricht für weitergeleitete Rufnummern hinterlassen", "title": "Anrufweiterleitung", - "strategies": { - "off": { - "title": "Aus", - "helpText": "Die Anrufweiterleitung ist deaktiviert und Anrufe werden nicht weitergeleitet." - }, - "alwaysOn": { - "title": "Immer aktiv", - "helpText": "Anrufe werden zu einem ausgewählten Ziel weitergeleitet." - }, - "busy": { - "title": "Besetzt", - "helpText": "Anrufe werden weitergeleitet, wenn alle Leitungsauftritte belegt sind." - }, - "noAnswer": { - "title": "Keine Antwort", - "helpText": "Anrufe werden weitergeleitet, wenn der Anruf auf keinem zugewiesenen Gerät beantwortet wird." - }, - "common": { - "voicemail": { - "label": "Voicemail", - "selectLabel": "Ziel Voicemail-Box" - }, - "phoneNumber": { - "label": "Telefonnummer", - "inputLabelTo": "Anrufe weiterleiten nach", - "inputLabelFrom": "Anrufe weiterleiten von" - }, - "options": { - "title": "Zusätzliche Optionen", - "forward": { - "title": "Nur direkte Anrufe weiterleiten", - "helpText": "Eingehende Anrufe, die auf Klingelgruppen, Warteschlangen usw. abzielen, werden nicht weitergeleitet." - }, - "acknowledge": { - "title": "Anruf bestätigen", - "helpText": "Erhalten Sie eine Aufforderung zur Annahme weitergeleiteter Anrufe. Dadurch wird vermieden, dass Voicemails mit der Nummer \"Anrufe weiterleiten nach\" in Verbindung gebracht werden." - }, - "keep": { - "title": "Ursprüngliche Anrufer-ID beibehalten", - "helpText": "Die ursprüngliche eingehende Anrufer-ID wird für den weitergeleiteten Anruf verwendet." - }, - "ring": { - "title": "Meine anderen Geräte klingeln lassen", - "helpText": "Auch Ihre anderen Geräte klingeln, wenn ein weitergeleiteter Anruf eingeht." - } - } - } - }, - - "toast": { - "error": { - "save": "Hoppla, es gab ein Problem beim Anwenden Ihrer Änderungen" - } - } + "timeoutWarning": "Um Sprachnachrichten für weitergeleitete Rufnummern zu hinterlassen, muss Ihre Rufzeichen-Zeitüberschreitung mindestens 30 Sekunden betragen. Wenn Sie jetzt speichern, werden Sie automatisch in die Benutzereinstellungen weitergeleitet, wo Sie die Rufzeichen-Zeitüberschreitung aktualisieren können.", + "__comment": ": Modus für Failover bei Anrufweiterleitung hinzugefügt", + "__version": "4.0", + "failoverWarning": "Im „Failover-Modus“ haben die Anrufweiterleitungseinstellungen nur dann Geltung, wenn keines der Geräte dieses Benutzers registriert ist.", + "failover_title": "Anrufweiterleitung (Failover-Modus)" }, - "user": "Benutzer", "callRecording": { "title": "Angepasste Anrufaufzeichnung", "headline": "Anpassungen für Anrufaufzeichnung des Benutzers", diff --git a/i18n/en-US.json b/i18n/en-US.json index fcf2158a..9e24bc22 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -615,72 +615,20 @@ }, "uploadPicture": "Upload a Picture", "user": "User", - "callForwarding": { - "title": "Call Forwarding", - "strategies": { - "off": { - "title": "Off", - "helpText": "Call Forwarding is disabled and calls will not be forwarded." - }, - "alwaysOn": { - "title": "Always On", - "helpText": "Calls will be forwarded to a destination of choice." - }, - "busy": { - "title": "Busy", - "helpText": "Calls will be forwarded if all line appearances are busy." - }, - "noAnswer": { - "title": "No Answer", - "helpText": "Calls will be forwarded if the call is not answered on any assigned devices." - }, - "common": { - "voicemail": { - "label": "Voicemail", - "selectLabel": "Target voicemail box" - }, - "phoneNumber": { - "label": "Phone number", - "inputLabelTo": "Forward calls to", - "inputLabelFrom": "Forward calls from" - }, - "options": { - "title": "Additional Options", - "forward": { - "title": "Forward direct calls only", - "helpText": "Inbound calls targeting ring groups, queues, etc will not be forwarded." - }, - "acknowledge": { - "title": "Acknowledge Call", - "helpText": "Receive a prompt to accept forwarded calls. This prevents voicemails from being associated with the \"Forward To\" number." - }, - "keep": { - "title": "Keep initial Caller ID", - "helpText": "The original incoming Caller ID will be used for the forwarded call." - }, - "ring": { - "title": "Ring my other devices", - "helpText": "Your other devices will also ring when receiving a forwarded call." - } - } - } - }, - - "toast": { - "error": { - "save": "Ooops, there was an issue while applying your changes" - } - } - }, - "call_failover": { + "call_forward": { "failoverMode": "Failover Mode", - "directCallsOnly": "Direct calls only", - "headline": "User Call Failover Settings", + "directCallsOnly": "Forward direct calls only", + "headline": "User Call Forwarding Settings", "keepCallerId": "Keep Original Caller-ID", - "label": "Forward all calls to", + "label": "Forward all calls to" , "placeholder": "+14157283992", - "requireKeyPress": "Require pressing 1 to accept the call", - "title": "Failover Mode" + "requireKeyPress": "Leave voicemails on forwarded numbers", + "title": "Call Forwarding", + "timeoutWarning": "In order to leave voicemails on forwarded numbers, your ringing timeout needs to be set to at least 30sec. By saving now, you will automatically be redirected to the user edition where you can update the ringing timeout.", + "__comment": ": Now add a mode for failover for call forward", + "__version": "4.0", + "failoverWarning": "In \"Failover Mode\", the call-forward settings will only apply when none of this user's devices are registered.", + "failover_title": "Call-Forwarding (Failover Mode)" }, "callRecording": { "title": "Customized Call Recording", diff --git a/i18n/es-ES.json b/i18n/es-ES.json index ec140564..8e5ac72c 100644 --- a/i18n/es-ES.json +++ b/i18n/es-ES.json @@ -500,62 +500,15 @@ }, "uploadPicture": "Cargar una imagen", "user": "Usuario", - "callForwarding": { - "title": "Desvío de Llamadas", - "strategies": { - "off": { - "title": "Apagar", - "helpText": "El desvío de llamadas está desactivado y las llamadas no serán desviadas." - }, - "alwaysOn": { - "title": "Siempre Activo", - "helpText": "Las llamadas serán desviadas a un destino de elección." - }, - "busy": { - "title": "Ocupado", - "helpText": "Las llamadas serán desviadas si todas las apariencias de línea están ocupadas." - }, - "noAnswer": { - "title": "Sin Respuesta", - "helpText": "Las llamadas serán desviadas si la llamada no es contestada en ninguno de los dispositivos asignados." - }, - "common": { - "voicemail": { - "label": "Correo de voz", - "selectLabel": "Seleccionar buzón de voz de destino" - }, - "phoneNumber": { - "label": "Número de teléfono", - "inputLabelTo": "Desviar llamadas a", - "inputLabelFrom": "Desviar llamadas desde" - }, - "options": { - "title": "Opciones adicionales", - "forward": { - "title": "Desviar solo llamadas directas", - "helpText": "Las llamadas entrantes dirigidas a grupos de timbre, colas, etc. no serán desviadas." - }, - "acknowledge": { - "title": "Reconocer llamada", - "helpText": "Reciba un aviso para aceptar llamadas desviadas. Esto evita que los mensajes de voz se asocien con el número \"Desviar a\"." - }, - "keep": { - "title": "Conservar identificación de llamada inicial", - "helpText": "Se utilizará la identificación de llamada entrante original para la llamada desviada." - }, - "ring": { - "title": "Sonar en mis otros dispositivos", - "helpText": "Tus otros dispositivos también sonarán al recibir una llamada desviada." - } - } - } - }, - - "toast": { - "error": { - "save": "Ups, hubo un problema al aplicar tus cambios" - } - } + "call_forward": { + "directCallsOnly": "Desvia llamadas directas sólamente", + "headline": "Configuración de Desvío de llamadas del usuario", + "keepCallerId": "Mantener su identificador de llamadas", + "label": "Desenvíar todas las llamadas a", + "placeholder": "+14157283992", + "requireKeyPress": "Deja mensajes de voz en números desvíados ", + "title": "Desvío de llamadas", + "timeoutWarning": "Para dejar mensajes de voz en números desvíados, su tiempo de espera de llamada debe ser ajustado a menos de 30 seg. Salvando ahora, será automáticamente desviado a la edición del usuario donde puede actualizar el intervalo de espera que suena." }, "callRecording": { "title": "Grabación de llamadas entrantes", @@ -603,6 +556,7 @@ "placeholder": "Número de destino " } }, + "googlePrinter": { "title": "Impresora de Google", "text1": "seleccionar ", diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json index 13f57e7d..c8d49987 100644 --- a/i18n/fr-FR.json +++ b/i18n/fr-FR.json @@ -474,62 +474,15 @@ }, "uploadPicture": "Uploader une image", "user": "Utilisateur", - "callForwarding": { - "title": "Transfert d'appel", - "strategies": { - "off": { - "title": "Désactivé", - "helpText": "Le transfert d'appel est désactivé et les appels ne seront pas redirigés." - }, - "alwaysOn": { - "title": "Toujours actif", - "helpText": "Les appels seront redirigés vers une destination de choix." - }, - "busy": { - "title": "Occupé", - "helpText": "Les appels seront redirigés si toutes les apparences de ligne sont occupées." - }, - "noAnswer": { - "title": "Pas de réponse", - "helpText": "Les appels seront redirigés si l'appel n'est pas répondu sur tous les appareils assignés." - }, - "common": { - "voicemail": { - "label": "Messagerie vocale", - "selectLabel": "Boîte vocale cible" - }, - "phoneNumber": { - "label": "Numéro de téléphone", - "inputLabelTo": "Rediriger les appels vers", - "inputLabelFrom": "Rediriger les appels depuis" - }, - "options": { - "title": "Options supplémentaires", - "forward": { - "title": "Rediriger uniquement les appels directs", - "helpText": "Les appels entrants ciblant des groupes de sonnerie, des files d'attente, etc. ne seront pas redirigés." - }, - "acknowledge": { - "title": "Reconnaître l'appel", - "helpText": "Recevez une invite pour accepter les appels redirigés. Cela évite que les messages vocaux soient associés au numéro de \"Rediriger vers\"." - }, - "keep": { - "title": "Conserver l'identifiant de l'appelant initial", - "helpText": "L'identifiant d'appel entrant original sera utilisé pour l'appel redirigé." - }, - "ring": { - "title": "Faire sonner mes autres appareils", - "helpText": "Vos autres appareils sonneront également lors de la réception d'un appel redirigé." - } - } - } - }, - - "toast": { - "error": { - "save": "Oups, il y a eu un problème lors de l'application de vos modifications" - } - } + "call_forward": { + "directCallsOnly": "Seulement transférer les appels direct", + "headline": "Réglages du transfert d'appel", + "keepCallerId": "Garder le Caller-ID", + "label": "Transférer tous les appels vers", + "placeholder": "+14157283992", + "requireKeyPress": "Laisser message sur le répondeur du numéro transferé", + "title": "Transfert d'appels", + "timeoutWarning": "Afin de pouvoir laisser un message sur le répondeur du numéro transferé, la durée de sonnerie de l'utilisateur doit être d'au moins 30sec. En cliquant sur le bouton \"Sauvegarder\", vous serez automatiquement redirigé vers l'édition d'utilisateur où vous pourrez modifier la durée de sonnerie." }, "callRecording": { "title": "Enregistrement d'appel entrant", diff --git a/i18n/ru-RU.json b/i18n/ru-RU.json index 3c7cc0c7..0f10b24a 100644 --- a/i18n/ru-RU.json +++ b/i18n/ru-RU.json @@ -470,64 +470,19 @@ "successResetPassword": "Успешно! {{ name }} скоро получит сообщение по электронной почте как сбросить пароль." }, "uploadPicture": "Загрузка картинки", - "callForwarding": { - "title": "Переадресация звонков", - "strategies": { - "off": { - "title": "Выключено", - "helpText": "Переадресация звонков отключена, и звонки не будут переадресованы." - }, - "alwaysOn": { - "title": "Всегда включено", - "helpText": "Звонки будут переадресованы на выбранное направление." - }, - "busy": { - "title": "Занято", - "helpText": "Звонки будут переадресованы, если все линии заняты." - }, - "noAnswer": { - "title": "Нет ответа", - "helpText": "Звонки будут переадресованы, если звонок не будет принят на каких-либо назначенных устройствах." - }, - "common": { - "voicemail": { - "label": "Голосовая почта", - "selectLabel": "Целевой ящик голосовой почты" - }, - "phoneNumber": { - "label": "Номер телефона", - "inputLabelTo": "Переадресовать звонки на", - "inputLabelFrom": "Переадресовать звонки от" - }, - "options": { - "title": "Дополнительные параметры", - "forward": { - "title": "Переадресовать только прямые звонки", - "helpText": "Входящие звонки, направленные на группы звонков, очереди и т. д., не будут переадресованы." - }, - "acknowledge": { - "title": "Подтверждение звонка", - "helpText": "Получите предложение принять переадресованные звонки. Это предотвращает связывание голосовых сообщений с номером \"Переадресовать на\"." - }, - "keep": { - "title": "Сохранить начальный идентификатор вызывающего", - "helpText": "Оригинальный входящий идентификатор вызывающего будет использоваться для переадресованного вызова." - }, - "ring": { - "title": "Звонить на мои другие устройства", - "helpText": "Ваши другие устройства также будут звонить при получении переадресованного звонка." - } - } - } - }, - - "toast": { - "error": { - "save": "Упс, возникла проблема при применении ваших изменений" - } - } - }, "user": "Пользователь", + "call_forward": { + "directCallsOnly": "Переводить только прямые вызовы", + "headline": "Настройка переадресации вызовов", + "keepCallerId": "Сохранить ваш АОН", + "label": "Перевести все вызовы" , + "placeholder": "+74157283992", + "requireKeyPress": "Оставить голосовые сообщения на переадресованных номерах", + "title": "Переадресация вызовов", + "timeoutWarning": "Для перевода голосовых сообщений на переадресуемые номера, вы должны установить ограничение времени вызова не менее 30 сек. Для экономии времени, вы будете автоматически перенаправлены в меню редактирования пользователя, где вы сможете изменить время ограничения вызова.", + "failoverWarning": "\"Запасной вариант\" переадресации будет ипользован когда ни одного устройства пользователя не зарегистрировано.", + "failover_title": "Запасной вариант переадресация" + }, "callRecording": { "title": "Запись входящих разговоров", "headline": "Настройки записи разговоров", diff --git a/style/app.scss b/style/app.scss index d3f2b4e0..0932dae5 100644 --- a/style/app.scss +++ b/style/app.scss @@ -15,8 +15,6 @@ @import '../submodules/strategy/partials/changeCallerIdPopup.scss'; @import '../submodules/strategy/partials/customConferenceGreeting.scss'; -@import '../submodules/usersCallForwarding/usersCallForwarding.scss'; - #voip_container { .left-menu { #myOffice { diff --git a/submodules/users/users.js b/submodules/users/users.js index 267b2699..b3f6e375 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -254,10 +254,16 @@ define(function(require) { iconColor: 'monster-blue', title: self.i18n.active().users.caller_id.title }, - call_forwarding: { - icon: 'icon-telicon-forward', + call_failover: { + icon: 'fa fa-share', iconColor: 'monster-orange', - title: self.i18n.active().users.callForwarding.title + title: self.i18n.active().users.call_forward.failover_title, + hidden: true + }, + call_forward: { + icon: 'fa fa-share', + iconColor: 'monster-yellow', + title: self.i18n.active().users.call_forward.title }, hotdesk: { icon: 'fa fa-fire', @@ -298,11 +304,6 @@ define(function(require) { icon: 'fa fa-ban', iconColor: 'monster-red', title: self.i18n.active().users.do_not_disturb.title - }, - call_failover: { - telicon: 'failover', - iconColor: 'monster-orange', - title: self.i18n.active().users.call_failover.title } }, isFeatureAvailable), outboundPrivacy: _.map(self.appFlags.common.outboundPrivacy, function(item) { @@ -373,15 +374,10 @@ define(function(require) { } dataUser.extra.countFeatures = 0; - _.each(dataUser.extra.features, function(feature) { - var featureKey = feature; - if (feature === 'call_forward' && 'call_forwarding' in dataUser.extra.mapFeatures) { - featureKey = 'call_forwarding'; - } - - if (featureKey in dataUser.extra.mapFeatures) { + _.each(dataUser.extra.features, function(v) { + if (v in dataUser.extra.mapFeatures) { dataUser.extra.countFeatures++; - dataUser.extra.mapFeatures[featureKey].active = true; + dataUser.extra.mapFeatures[v].active = true; } }); @@ -1529,12 +1525,24 @@ define(function(require) { self.usersRenderDoNotDisturb(currentUser); }); - template.on('click', '.feature[data-feature="call_failover"]', function() { - self.usersRenderCallFailover(currentUser); - }); - - template.on('click', '.feature[data-feature="call_forwarding"]', function() { - self.usersCallForwardingRender(currentUser); + template.on('click', '.feature[data-feature="call_forward"]', function() { + if (currentUser.extra.features.indexOf('find_me_follow_me') < 0) { + var featureUser = $.extend(true, {}, currentUser); + self.usersGetMainCallflow(featureUser.id, function(mainCallflow) { + if (mainCallflow && 'flow' in mainCallflow) { + var flow = mainCallflow.flow; + while (flow.module !== 'user' && '_' in flow.children) { + flow = flow.children._; + } + if (flow.data.timeout < 30) { + featureUser.extra.timeoutTooShort = true; + } + } + self.usersRenderCallForward(featureUser); + }); + } else { + self.usersRenderCallForward(currentUser); + } }); template.on('click', '.feature[data-feature="hotdesk"]', function() { @@ -2574,62 +2582,121 @@ define(function(require) { }); }, - usersRenderCallFailover: function(currentUser) { + usersFormatCallForwardData: function(user) { var self = this, + isCallForwardConfigured = _.has(user, 'call_forward.enabled'), + isCallForwardEnabled = _.get(user, 'call_forward.enabled', false), + isFailoverEnabled = _.get(user, 'call_failover.enabled', false); + + // cfmode is off if call_forward.enabled = false && call_failover.enabled = false + // cfmode is failover if call_failover.enabled = true + // cfmode is on if call_failover.enabled = false && call_forward.enabled = true + var callForwardMode = 'off'; + if (isFailoverEnabled) { + callForwardMode = 'failover'; + } else if (isCallForwardEnabled) { + callForwardMode = 'on'; + } + + return _.merge({}, user, _.merge({ + extra: { + callForwardMode: callForwardMode + } + }, isCallForwardConfigured && { + call_forward: _.merge({}, _.has(user, 'call_forward.number') && { + number: monster.util.unformatPhoneNumber(user.call_forward.number) + }) + } + )); + }, + + usersRenderCallForward: function(currentUser) { + var self = this, + formattedCallForwardData = self.usersFormatCallForwardData(currentUser), featureTemplate = $(self.getTemplate({ - name: 'feature-call_failover', - data: currentUser, + name: 'feature-call_forward', + data: formattedCallForwardData, submodule: 'users' })), switchFeature = featureTemplate.find('.switch-state'), - featureForm = featureTemplate.find('#call_failover_form'), + featureForm = featureTemplate.find('#call_forward_form'), args = { callback: function() { popup.dialog('close').remove(); }, openedTab: 'features' - }; + }, + timeoutWarningBox = featureTemplate.find('.help-box.red-box'); monster.ui.mask(featureTemplate.find('#number'), 'phoneNumber'); - monster.ui.validate(featureForm, { - rules: { - number: { - phoneNumber: true - } - } + if (currentUser.hasOwnProperty('call_forward') && currentUser.call_forward.require_keypress) { + timeoutWarningBox.hide(); + } + + monster.ui.validate(featureForm); + + featureTemplate.find('input[name="require_keypress"]').on('change', function() { + timeoutWarningBox.toggle(); }); featureTemplate.find('.cancel-link').on('click', function() { popup.dialog('close').remove(); }); + featureTemplate.find('.feature-select-mode button').on('click', function() { + var $this = $(this); + + featureTemplate.find('.feature-select-mode button').removeClass('selected monster-button-primary'); + $(this).addClass('selected monster-button-primary'); + + $this.data('value') === 'off' ? featureTemplate.find('.content').slideUp() : featureTemplate.find('.content').slideDown(); + $this.data('value') === 'failover' ? featureTemplate.find('.failover-info').slideDown() : featureTemplate.find('.failover-info').slideUp(); + }); + switchFeature.on('change', function() { $(this).prop('checked') ? featureTemplate.find('.content').slideDown() : featureTemplate.find('.content').slideUp(); }); featureTemplate.find('.save').on('click', function() { - if (!monster.ui.valid(featureForm)) { - return; - } - var formData = monster.ui.getFormData('call_failover_form'), + var formData = monster.ui.getFormData('call_forward_form'), phoneNumber = monster.util.unformatPhoneNumber(formData.number), - formattedFormData = _.merge({}, formData, { - enabled: switchFeature.prop('checked'), - number: phoneNumber - }), - payload = { call_failover: formattedFormData }, - userToSave = $.extend(true, {}, currentUser, payload); + isValidPhoneNumber = !_.isUndefined(phoneNumber); - self.usersUpdateUser(userToSave, function(data) { - args.userId = data.data.id; + if (monster.ui.valid(featureForm) && isValidPhoneNumber) { + formData.require_keypress = !formData.require_keypress; + formData.number = phoneNumber; - self.usersRender(args); - }); + var selectedType = featureTemplate.find('.feature-select-mode button.selected').data('value'); + if (selectedType === 'off') { + formData.enabled = false; + } + + var payload = { call_forward: _.merge({}, formData), call_failover: _.merge({}, formData) }; + if (selectedType === 'failover') { + payload.call_failover.enabled = true; + payload.call_forward.enabled = false; + } else if (selectedType === 'on') { + payload.call_failover.enabled = false; + payload.call_forward.enabled = true; + } + + var userToSave = $.extend(true, {}, currentUser, payload); + + if (timeoutWarningBox.is(':visible')) { + args.openedTab = 'name'; + } + + self.usersUpdateUser(userToSave, function(data) { + args.userId = data.data.id; + + self.usersRender(args); + }); + } }); var popup = monster.ui.dialog(featureTemplate, { - title: currentUser.extra.mapFeatures.call_failover.title, + title: currentUser.extra.mapFeatures.call_forward.title, position: ['center', 20] }); @@ -3358,6 +3425,12 @@ define(function(require) { } } + if (userData.hasOwnProperty('call_forward')) { + if (userData.call_forward.number === '') { + delete userData.call_forward.number; + } + } + // if presence_id doesn't have a proper value, delete it and remove the internal callerId if (!userData.hasOwnProperty('presence_id') || userData.presence_id === 'unset' || !userData.presence_id) { delete userData.presence_id; diff --git a/submodules/users/users.scss b/submodules/users/users.scss index dfc0a4bd..59412f65 100644 --- a/submodules/users/users.scss +++ b/submodules/users/users.scss @@ -825,7 +825,7 @@ } } - &[data-feature="call_failover"] { + &[data-feature="call_forward"] { width: 600px; .btn-group { diff --git a/submodules/users/views/feature-call_failover.html b/submodules/users/views/feature-call_failover.html deleted file mode 100644 index cf19dbbc..00000000 --- a/submodules/users/views/feature-call_failover.html +++ /dev/null @@ -1,58 +0,0 @@ -
-
- - - -
- -
-
-
- -
- -
-
- - - - -
-
- -
-
- {{ i18n.cancel }} - -
-
-
diff --git a/submodules/users/views/feature-call_forward.html b/submodules/users/views/feature-call_forward.html new file mode 100644 index 00000000..36ec47b1 --- /dev/null +++ b/submodules/users/views/feature-call_forward.html @@ -0,0 +1,75 @@ +
+
+ + + +
+ +
+
+ {{#monsterText 'info'}} + {{ i18n.users.call_forward.failoverWarning }} + {{/monsterText}} +
+
+
+ +
+ +
+
+ + + + + + +
+ + {{#if extra.timeoutTooShort}} + {{#monsterText 'error'}} + {{ i18n.users.call_forward.timeoutWarning }} + {{/monsterText}} + {{/if}} +
+ +
+
+ {{ i18n.cancel }} + +
+
+
diff --git a/submodules/users/views/features.html b/submodules/users/views/features.html index 69e69fbc..cc22e8bf 100644 --- a/submodules/users/views/features.html +++ b/submodules/users/views/features.html @@ -4,11 +4,7 @@ {{#unless hidden}}
- {{#if icon}} - {{else}} - {{telicon telicon}} - {{/if}}
{{title}} diff --git a/submodules/users/views/row.html b/submodules/users/views/row.html index 9ce706a0..f11c2746 100644 --- a/submodules/users/views/row.html +++ b/submodules/users/views/row.html @@ -48,13 +48,7 @@ {{#if extra.hasFeatures}} {{#each extra.mapFeatures}} {{#if this.active}} - {{#if this.icon}} - - {{else}} - - {{telicon this.telicon}} - - {{/if}} + {{/if}} {{/each}} {{else}} diff --git a/submodules/usersCallForwarding/usersCallForwarding.js b/submodules/usersCallForwarding/usersCallForwarding.js deleted file mode 100644 index 76547877..00000000 --- a/submodules/usersCallForwarding/usersCallForwarding.js +++ /dev/null @@ -1,520 +0,0 @@ -define(function(require) { - var _ = require('lodash'); - var monster = require('monster'); - - return { - usersCallForwardingRender: function(user) { - var self = this, - getData = _.bind(self.usersCallForwardingGetData, self), - bindEvents = _.bind(self.usersCallForwardingBindingEvents, self), - initTemplate = function(data) { - var isCallForwardVmEnabled = _.get(user, 'smartpbx.call_forwarding.enabled', false), - isCallForwardEnabled = _.has(user, 'call_forward'), - isUnconditionalVmEnabled = !isCallForwardEnabled && _.has(user, 'smartpbx.call_forwarding.unconditional') && isCallForwardVmEnabled, - isBusyVmEnabled = !isCallForwardEnabled && _.has(user, 'smartpbx.call_forwarding.busy') && isCallForwardVmEnabled, - isNoAnswerVmEnabled = !isCallForwardEnabled && _.has(user, 'smartpbx.call_forwarding.no_answer') && isCallForwardVmEnabled, - isBusyEnabled = _.get(user, 'call_forward.busy.enabled', false), - isNoAnswerEnabled = _.get(user, 'call_forward.no_answer.enabled', false), - layoutTemplate = $(self.getTemplate({ - name: 'layout', - data: { - data: data, - enabled: isCallForwardEnabled || isCallForwardVmEnabled, - isUnconditionalEnabled: _.get(user, 'call_forward.unconditional.enabled', (isBusyEnabled || isNoAnswerEnabled) - ? false - : _.get(user, 'call_forward.enabled', false)) || isUnconditionalVmEnabled, - isBusyEnabled: isBusyEnabled || isBusyVmEnabled, - isNoAnswerEnabled: isNoAnswerEnabled || isNoAnswerVmEnabled - }, - submodule: 'usersCallForwarding' - })); - - layoutTemplate.find('.feature-popup-title').each(function() { - var strategy = $(this).data('template'), - hasVmBox = _.get(user, 'smartpbx.call_forwarding.enabled') && !_.has(user, 'call_forward'); - - function isAnyStrategySpecificSettingAvailable(property) { - var strategies = Object.keys(_.get(user, 'call_forward', {})); - return strategies.some(function(str) { - return str !== 'enabled' && _.get(user, ['call_forward', str, property]) !== undefined; - }); - } - - function findAnyStrategySpecificSetting(property) { - var strategies = Object.keys(_.get(user, 'call_forward', {})); - for (var i = 0; i < strategies.length; i++) { - var str = strategies[i]; - if (str !== 'enabled' && _.get(user, ['call_forward', str, property]) !== undefined) { - return _.get(user, ['call_forward', str, property]); - } - } - return undefined; - } - - function getCallForwardSetting(property, defaultValue) { - var anyStrategySpecificAvailable = isAnyStrategySpecificSettingAvailable(property); - var generalSetting = _.get(user, ['call_forward', property], defaultValue); - - if (anyStrategySpecificAvailable) { - return findAnyStrategySpecificSetting(property); - } else { - return generalSetting; - } - } - - var isKeepCallerIdEnabled = getCallForwardSetting('keep_caller_id', false); - var isDirectCallsOnlyEnabled = getCallForwardSetting('direct_calls_only', false); - var isRequireKeypressEnabled = getCallForwardSetting('require_keypress', false); - var isIgnoreEarlyMediaEnabled = getCallForwardSetting('ignore_early_media', false); - - if (strategy !== 'off') { - var simpleStrategyTemplate = $(self.getTemplate({ - name: 'simpleStrategy', - data: { - strategy: strategy, - enabled: isCallForwardVmEnabled || isCallForwardEnabled, - number: _.get(user, ['call_forward', strategy, 'number'], _.get(user, ['call_forward', 'number'], '')), - keep_caller_id: isKeepCallerIdEnabled, - direct_calls_only: isDirectCallsOnlyEnabled, - require_keypress: isRequireKeypressEnabled, - ignore_early_media: isIgnoreEarlyMediaEnabled, - type: hasVmBox ? 'voicemail' : isCallForwardEnabled ? 'phoneNumber' : 'voicemail', - voicemails: data.voicemails, - selectedVoicemailId: _.get(user, ['smartpbx', 'call_forwarding', strategy, 'voicemail'], data.voicemails[0]), - user: user - }, - submodule: 'usersCallForwarding' - })); - $(this).find('.simple-strategy').append(simpleStrategyTemplate); - } - }); - - return layoutTemplate; - }; - - monster.waterfall([ - getData, - function(voicemails, callback) { - voicemails || callback(new Error('No voicemails received')); - - var userVoicemails = _.filter(voicemails, function(vmbox) { - return vmbox.owner_id === user.id; - }); - callback(null, userVoicemails); - }, - function(userVoicemails, callback) { - var data = { - voicemails: userVoicemails, - user: user - }; - try { - var $template = initTemplate(data); - bindEvents($template, data); - monster.ui.dialog($template, { - title: user.extra.mapFeatures.call_forwarding.title, - position: ['center', 20] - }); - callback(null); - } catch (e) { - callback(e); - } - } - ], function(err) { - err && console.error('Error in processing:', err); - }); - }, - - usersCallForwardingGetData: function(callback) { - var self = this; - - self.callApi({ - resource: 'voicemail.list', - data: { - accountId: self.accountId, - filters: { - paginate: 'false' - } - }, - success: _.flow( - _.partial(_.get, _, 'data'), - _.partial(callback, null) - ), - error: _.partial(callback, _, []) - }); - }, - - usersCallForwardingBindingEvents: function($template, data) { - var self = this, - getPopup = function($node) { - return $node.parents('.ui-dialog-content'); - }; - - $template.find('.save').on('click', function() { - var $button = $(this); - - monster.waterfall([ - function(waterfallCallback) { - var updateData = self.usersCallForwardingGetFormData(data), - cleanedData = self.usersCleanUserData(updateData); - - waterfallCallback(null, cleanedData); - }, - function(cleanedData, waterfallCallback) { - self.usersCallForwardingSaveData(cleanedData, function(err) { - if (err) { - return monster.ui.toast({ - type: 'warning', - message: self.i18n.active().users.callForwarding.toast.error.save - }); - } - getPopup($button).dialog('close'); - - self.usersRender({ - userId: data.user.id, - openedTab: 'features' - }); - }); - waterfallCallback(true); - } - ]); - }); - - $template.find('.cancel-link').on('click', function() { - getPopup($(this)).dialog('close'); - }); - - $template.find('.switch-state').on('change', function() { - var self = this, - strategy = self.parentElement.parentElement.parentElement.attributes['data-template'] - ? self.parentElement.parentElement.parentElement.attributes['data-template'].value - : self.parentElement.parentElement.parentElement.parentElement.attributes['data-template'].value, - dataStrategyString = 'data-strategy="' + strategy + '"', - simpleStrategyContainers = $template.find('.simple-strategy'); - - _.forEach(simpleStrategyContainers, function(div) { - if (div.outerHTML.includes(dataStrategyString) && !_.has(data.user, ['call_forward', strategy])) { - $template.find(div).removeClass('disabled'); - $(div).find('.options').addClass('disabled'); - $(div).find('.simple-control-group.phone-number').addClass('disabled'); - $(div).find('.simple-control-group.voicemail').removeClass('disabled'); - $(div).closest('.simple-strategy').find('input[value="voicemail"]').prop('checked', true); - } else if (div.outerHTML.includes(dataStrategyString) && _.has(data.user, ['call_forward', strategy])) { - $template.find(div).removeClass('disabled'); - } else { - $template.find(div).addClass('disabled'); - }; - }); - }); - - $template.on('change', '.radio-state', function() { - var self = this; - - if (self.checked && self.defaultValue === 'phoneNumber') { - $(this).closest('.phone-number-wrapper').siblings().find('.simple-control-group.voicemail').addClass('disabled').find('input').prop('checked', true); - $(this).closest('.phone-number-wrapper').find('.simple-control-group.phone-number').removeClass('disabled').find('input').prop('checked', true); - - $(this).closest('.phone-number-wrapper').siblings('.options').removeClass('disabled'); - } - - if (self.checked && self.defaultValue === 'voicemail') { - $(this).closest('.voicemail-wrapper').find('.simple-control-group.voicemail').removeClass('disabled').find('input').prop('checked', true); - $(this).closest('.voicemail-wrapper').siblings().find('.simple-control-group.phone-number').addClass('disabled').find('input').prop('checked', false); - $(this).closest('.voicemail-wrapper').siblings('.options').addClass('disabled'); - } - }); - - $template.find('.checkbox').each(function() { - if ($(this).is(':checked')) { - $(this).closest('.option').addClass('option-checked'); - } - - $(this).on('change', function() { - if ($(this).is(':checked')) { - $(this).closest('.option').addClass('option-checked'); - } else { - $(this).closest('.option').removeClass('option-checked'); - } - }); - }); - }, - - usersCallForwardingGetFormData: function(data) { - var self = this, - user = data.user, - formData = monster.ui.getFormData('call_forward_form'), - callForwardStrategy = formData.call_forwarding_strategy, - isStategyBusy = callForwardStrategy === 'busy', - isStrategyOff = callForwardStrategy === 'off', - isStategyNoAnswer = callForwardStrategy === 'no_answer', - callForwardData = formData[callForwardStrategy], - defaultVoicemail = _.get(user, ['smartpbx', 'call_forwarding', 'default'], data.voicemails[0].id), - voicemail = isStrategyOff ? defaultVoicemail : _.get(callForwardData, 'voicemail.value', defaultVoicemail), - isSkipToVoicemailEnabled = isStrategyOff || isStategyBusy || isStategyNoAnswer || callForwardData.type === 'phoneNumber' ? false : true; - - monster.waterfall([ - function(waterfallCallback) { - var standardFlow = self.buildStandardFlow(user, voicemail); - _.set(standardFlow, 'data.skip_module', isSkipToVoicemailEnabled); - self.resetUserCallFlow(user, standardFlow); - waterfallCallback(true); - } - ]); - - if (callForwardData && callForwardData.type === 'phoneNumber') { - _.set(user, 'call_forward', { - [callForwardStrategy]: { - enabled: true, - number: _.get(callForwardData, 'phoneNumber', ''), - keep_caller_id: _.includes(callForwardData.isEnabled, 'keep'), - direct_calls_only: _.includes(callForwardData.isEnabled, 'forward'), - require_keypress: _.includes(callForwardData.isEnabled, 'acknowledge'), - ignore_early_media: _.includes(callForwardData.isEnabled, 'ring') - }, - enabled: true - }); - - _.set(user, 'smartpbx.call_forwarding', { - enabled: true - }); - } - - if ((callForwardData && callForwardData.type === 'voicemail') || isStrategyOff) { - var fullName = user.first_name + ' ' + user.last_name, - matchingVoicemail = data.voicemails.find(function(voicemail) { - return voicemail.name === fullName + '\'s VMBox'; - }), - matchingVoicemailId = matchingVoicemail ? matchingVoicemail.id : data.voicemails[0].id; - - _.set(user, 'smartpbx.call_forwarding', { - enabled: callForwardStrategy !== 'off', - [callForwardStrategy]: { - voicemail: voicemail - }, - 'default': matchingVoicemailId - }); - - if (isStrategyOff) { - _.set(user, 'call_forward', { - enabled: false - }); - }; - - delete user.call_forward; - } - - return user; - }, - - usersCallForwardingSaveData: function(userData, callback) { - var self = this; - - self.callApi({ - resource: 'user.update', - data: { - accountId: self.accountId, - userId: userData.id, - data: userData - }, - success: _.partial(callback, null), - error: _.partial(callback, _) - }); - }, - - getCallflowList: function(userId, callback) { - var self = this; - - self.callApi({ - resource: 'callflow.list', - data: { - accountId: self.accountId, - filters: { - filter_owner_id: userId - } - }, - success: function(callflowData) { - callback && callback(callflowData.data); - } - }); - }, - - getCallflow: function(callflowId, callback) { - var self = this; - - self.callApi({ - resource: 'callflow.get', - data: { - accountId: self.accountId, - callflowId: callflowId - }, - success: function(callflowData) { - callback && callback(callflowData.data); - } - }); - }, - - usersCleanUserData: function(userData) { - var self = this, - userData = $.extend(true, {}, userData), - fullName = monster.util.getUserFullName(userData), - defaultCallerIdName = fullName.substring(0, 15), - newCallerIDs = { - caller_id: { - internal: { - name: defaultCallerIdName - } - } - }; - - userData = $.extend(true, userData, newCallerIDs); - /* If the user has been removed from the directory */ - if (userData.extra) { - if (userData.extra.includeInDirectory === false) { - if ('directories' in userData && userData.extra.mainDirectoryId && userData.extra.mainDirectoryId in userData.directories) { - delete userData.directories[userData.extra.mainDirectoryId]; - } - } else { - userData.directories = userData.directories || {}; - - if (userData.extra.mainCallflowId) { - userData.directories[userData.extra.mainDirectoryId] = userData.extra.mainCallflowId; - } - } - - if ('differentEmail' in userData.extra && userData.extra.differentEmail) { - if ('email' in userData.extra) { - userData.email = userData.extra.email; - } - } else { - userData.email = userData.username; - } - - if ('language' in userData.extra) { - if (userData.extra.language !== 'auto') { - userData.language = userData.extra.language; - } else { - delete userData.language; - } - } - - /** - * When updating the user type, override existing one with new - * user type selected. - * Once set the `service` prop should not be removed by the UI. - * - */ - if (userData.extra.hasOwnProperty('licensedRole')) { - userData.service = { - plans: {} - }; - userData.service.plans[userData.extra.licensedRole] = { - account_id: monster.config.resellerId, - overrides: {} - }; - } - } - - // if presence_id doesn't have a proper value, delete it and remove the internal callerId - if (!userData.hasOwnProperty('presence_id') || userData.presence_id === 'unset' || !userData.presence_id) { - delete userData.presence_id; - - if (userData.caller_id.hasOwnProperty('internal')) { - delete userData.caller_id.internal.number; - } - } else { - // Always set the Internal Caller-ID Number to the Main Extension/Presence ID - userData.caller_id.internal.number = userData.presence_id + ''; - } - - if (userData.hasOwnProperty('caller_id_options') && userData.caller_id_options.hasOwnProperty('outbound_privacy') && userData.caller_id_options.outbound_privacy === 'default') { - delete userData.caller_id_options.outbound_privacy; - - if (_.isEmpty(userData.caller_id_options)) { - delete userData.caller_id_options; - } - } - - if (userData.timezone === 'inherit') { - delete userData.timezone; - } - - _.set(userData, 'ui_help.myaccount.showfirstUseWalkthrough', false); - _.set(userData, 'ui_help.voip.showDashboardWalkthrough', false); - _.set(userData, 'ui_help.voip.showUsersWalkthrough', false); - - delete userData.include_directory; - delete userData.features; - delete userData.extra; - delete userData['']; - delete userData.confirm_password; - - return userData; - }, - - resetUserCallFlow: function(user, flow) { - var self = this, - userId = user.id, - callback = user.callback; - - monster.waterfall([ - function(waterfallCallback) { - self.getCallflowList(userId, function(callflowList) { - waterfallCallback(null, callflowList[0].id); - }); - }, - function(callflowId, waterfallCallback) { - self.getCallflow(callflowId, function(callflow) { - waterfallCallback(null, callflow); - }); - }, - function(callflow, waterfallCallback) { - var isFlowsEqual = _.isEqual(callflow.flow, flow); - if (!isFlowsEqual) { - _.set(callflow, 'flow', flow); - self.callApi({ - resource: 'callflow.update', - data: { - accountId: self.accountId, - callflowId: callflow.id, - data: callflow - }, - success: function(callflowData) { - callback && callback(callflowData.data); - } - }); - } - waterfallCallback(true); - } - ], callback); - }, - - buildStandardFlow: function(user, voicemailId) { - var flow = { - module: 'user', - data: { - id: user.id, - timeout: 20, - can_call_self: false, - delay: 0, - strategy: 'simultaneous', - skip_module: true - }, - children: { - _: { - module: 'voicemail', - data: { - id: voicemailId, - action: 'compose', - callerid_match_login: false, - interdigit_timeout: 2000, - max_message_length: 500, - single_mailbox_login: false - }, - children: {} - } - } - }; - - return flow; - } - }; -}); diff --git a/submodules/usersCallForwarding/usersCallForwarding.scss b/submodules/usersCallForwarding/usersCallForwarding.scss deleted file mode 100644 index 2be4574a..00000000 --- a/submodules/usersCallForwarding/usersCallForwarding.scss +++ /dev/null @@ -1,247 +0,0 @@ -@import '../../../../css/partials/base'; - -.call-forwarding-popup { - width: 976px; -} - -.feature-popup-title { - display: flex; - align-items: center; - justify-content: space-between; -} - -.feature-popup-flex { - flex-direction: column; -} - -.call-forwarding-titles { - color: $woodsmoke; - font-size: 16px; - font-weight: normal; - height: 24px; - line-height: 24px; -} - -.call-forwarding-descriptions { - color: $woodsmoke; - font-size: 14px; - font-weight: normal; - height: 20px; - line-height: 20px; - margin-top: 10px; -} - -.popup-container .feature-popup-title { - display: flex; - align-items: center; -} - -.simple-strategy-row { - display: flex; - width: 100%; - justify-content: space-between; - align-items: center; -} - -.simple-strategy { - display: block; - width: 95%; -} - -.disabled { - display: none; -} - -.controlls-width { - background: $white; - border-radius: 8px; - border: 1px solid $french-gray; - height: 36px; - width: 100%; -} - -.options-container { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - align-items: center; - height: 150%; - margin-left: 10px; -} - -.additional-options-title { - font-weight: bold; -} - -.option { - width: calc(50% - 15px); - height: 100px; - margin: 5px; - background: $athens-gray; - border-radius: 8px; - border: 1px solid $french-gray; -} - -.option-checked { - width: calc(50% - 15px); - height: 100px; - margin: 5px; - background: $french-pass; - border-radius: 8px; - border: 1px solid $dodger-blue; -} - -.options-description { - margin: 10px; - font-size: 14px; - font-weight: normal; -} - -.options-title { - display: flex; - justify-content: space-between; - margin: 10px; -} - -.complex-strategy { - width: 100%; -} - -.complex-strategy-header { - display: flex; - justify-content: space-around; -} - -.complex-strategy-rules { - width: 100%; - display: flex; - justify-content: space-evenly; - margin-left: 10px; -} - -.complex-rule { - display: flex; - flex-direction: column; -} - -.specific-controls { - display: flex; - gap: 5px; - align-items: center; - margin-top: 5px; -} - -.selective-control-group { - margin-bottom: 10px; -} - -.control-label { - margin-top: 10px; -} - -.forward-from { - width: 200px; -} - -.forward-to { - width: 250px; -} - -.active-duration { - width: 150px; -} - -.remove-rule { - height: 70px; - width: 100px; - - .complex-rule { - float: right; - margin-right: 25px; - } -} - -.add-phone-number { - margin-top: 5px; - margin-bottom: 5px; - margin-left: 10px; - display: inline-flex; - padding: 13px; - border: 1px solid $french-gray; - border-radius: 4px; - background-image: -webkit-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -moz-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -ms-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -o-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - vertical-align: top; - text-align: center; - font-size: 12px; - line-height: 16px; -} - -.add-rule { - margin-top: 5px; - margin-bottom: 5px; - margin-left: 10px; - display: inline-flex; - padding: 13px; - border: 1px solid $french-gray; - border-radius: 4px; - background-image: -webkit-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -moz-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -ms-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -o-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - vertical-align: top; - text-align: center; - font-size: 12px; - line-height: 16px; -} - -.remove-number-button { - width: 14px; - display: inline-flex; - padding: 8px; - border: 1px solid $french-gray; - border-radius: 4px; - background-image: -webkit-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -moz-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -ms-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -o-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - vertical-align: top; - text-align: center; - font-size: 12px; - line-height: 16px; -} - -.remove-rule-button { - width: 14px; - display: inline-flex; - padding: 8px; - border: 1px solid $french-gray; - border-radius: 4px; - background-image: -webkit-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -moz-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -ms-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: -o-linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - background-image: linear-gradient(top, hsl(0, 0%, 98%) 0%, hsl(0, 0%, 95%) 100%); - vertical-align: top; - text-align: center; - font-size: 12px; - line-height: 16px; -} - -.table-cell { - width: 80px; -} - -.table-header { - border-radius: 0px; - box-shadow: inset 0px -1px 0px 0px $french-gray, inset 0px 1px 0px 0px $french-gray; -} - -.office-hours-wrapper { - margin-top: 10px; -} diff --git a/submodules/usersCallForwarding/views/layout.html b/submodules/usersCallForwarding/views/layout.html deleted file mode 100644 index 93e9643b..00000000 --- a/submodules/usersCallForwarding/views/layout.html +++ /dev/null @@ -1,115 +0,0 @@ -
-
- -
- - -
- -
-
- - -
- -
-
- -
-
- - -
- -
-
- -
-
- - -
- -
-
-
- -
-
- {{ i18n.cancel }} - -
-
-
diff --git a/submodules/usersCallForwarding/views/options.html b/submodules/usersCallForwarding/views/options.html deleted file mode 100644 index 4a9d40e0..00000000 --- a/submodules/usersCallForwarding/views/options.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- {{i18n.users.callForwarding.strategies.common.options.title}} -
-
- {{#each options as |option|}} - -
-
- {{option.title}} - - {{#monsterCheckbox "large-checkbox"}} - - {{/monsterCheckbox}} -
- -
- {{option.helpText}} -
-
- - {{/each}} -
-
diff --git a/submodules/usersCallForwarding/views/simpleStrategy.html b/submodules/usersCallForwarding/views/simpleStrategy.html deleted file mode 100644 index 990ed9cc..00000000 --- a/submodules/usersCallForwarding/views/simpleStrategy.html +++ /dev/null @@ -1,121 +0,0 @@ -
- -
-
- {{#monsterRadio i18n.users.callForwarding.strategies.common.voicemail.label }} - - {{/monsterRadio}} -
- -
-
- -
- -
-
-
-
- -
-
- {{#monsterRadio i18n.users.callForwarding.strategies.common.phoneNumber.label }} - - {{/monsterRadio}} -
- -
-
- -
- -
-
-
-
-
-
-
- {{i18n.users.callForwarding.strategies.common.options.title}} -
-
- -
-
- {{i18n.users.callForwarding.strategies.common.options.forward.title}} - - {{#monsterCheckbox "large-checkbox"}} - - {{/monsterCheckbox}} -
- -
- {{i18n.users.callForwarding.strategies.common.options.forward.helpText}} -
-
- -
-
- {{i18n.users.callForwarding.strategies.common.options.acknowledge.title}} - - {{#monsterCheckbox "large-checkbox"}} - - {{/monsterCheckbox}} -
- -
- {{i18n.users.callForwarding.strategies.common.options.acknowledge.helpText}} -
-
- -
-
- {{i18n.users.callForwarding.strategies.common.options.keep.title}} - - {{#monsterCheckbox "large-checkbox"}} - - {{/monsterCheckbox}} -
- -
- {{i18n.users.callForwarding.strategies.common.options.keep.helpText}} -
-
- -
-
- {{i18n.users.callForwarding.strategies.common.options.ring.title}} - - {{#monsterCheckbox "large-checkbox"}} - - {{/monsterCheckbox}} -
- -
- {{i18n.users.callForwarding.strategies.common.options.ring.helpText}} -
-
-
- -
-