diff --git a/i18n/en-US.json b/i18n/en-US.json index 87bf9aa..3ae8765 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -97,7 +97,15 @@ "users": "Users" }, "__comment": "UI-819, v3.19_s1: Showing an error popup when group data is outdated.", - "outdatedGroupsError": "Your Group's data is outdated and can not be rendered. Please contact your administrator to update your data." + "outdatedGroupsError": "Your Group's data is outdated and can not be rendered. Please contact your administrator to update your data.", + + "__comment": "UI-1352: Adding an option to enable/disable call forwarding on ring group", + "__version": "3.20", + "forward": { + "title": "Allow Call-Forward", + "headline": "Allow Call-Forward", + "description": "Enable this option if you want to allow this group's users to press their device \"Forward\" button to forward a call from this ring group. If this option is disabled, it will ignore the user's command." + } }, "devices": { diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json index abc4942..00d4516 100644 --- a/i18n/fr-FR.json +++ b/i18n/fr-FR.json @@ -93,7 +93,15 @@ "users": "Utilisateurs" }, "__comment": "UI-819, v3.19_s1: Showing an error popup when group data is outdated.", - "outdatedGroupsError": "Les données de vos Groupes sont obsolètes et ne peuvent être affichées. Veuillez contacter votre administrateur afin de mettre à jour vos données." + "outdatedGroupsError": "Les données de vos Groupes sont obsolètes et ne peuvent être affichées. Veuillez contacter votre administrateur afin de mettre à jour vos données.", + + "__comment": "UI-1352: Adding an option to enable/disable call forwarding on ring group", + "__version": "3.20", + "forward": { + "title": "Redirection d'appel", + "headline": "Autoriser la Redirection d'Appels", + "description": "Si cette option est activée, les utilisateurs de ce group pourront presser le bouton \"Redirection\" de leur téléphone afin de rediriger un appel de ce groupe. Si cette option est desactivée, ce groupe ignorera les commandes de redirections." + } }, "devices": { diff --git a/submodules/groups/groups.css b/submodules/groups/groups.css index f8b89de..6f084ca 100644 --- a/submodules/groups/groups.css +++ b/submodules/groups/groups.css @@ -442,7 +442,7 @@ -moz-box-sizing: border-box; box-sizing: border-box; - width: 33.33%; + width: 25%; height: 150px; border: 1px solid #FFF; text-align: center; @@ -552,4 +552,10 @@ .feature-popup-container[data-feature="next_action"] .next-action > *:not(:first-child) { margin-left: 10px; +} + + +/* Next Action Feature */ +.feature-popup-container[data-feature="forward"] .help-box { + margin: 5px 20px 20px } \ No newline at end of file diff --git a/submodules/groups/groups.js b/submodules/groups/groups.js index 962fe4d..d246ea3 100644 --- a/submodules/groups/groups.js +++ b/submodules/groups/groups.js @@ -136,9 +136,14 @@ define(function(require){ title: self.i18n.active().groups.ringback.title }, next_action: { - icon: 'icon-share-alt', + icon: 'icon-arrow-right', iconColor: 'icon-green', title: self.i18n.active().groups.nextAction.title + }, + forward: { + icon: 'icon-mail-forward', + iconColor: 'icon-orange', + title: self.i18n.active().groups.forward.title } }, hasFeatures: false @@ -460,6 +465,10 @@ define(function(require){ template.find('.feature[data-feature="next_action"]').on('click', function() { self.groupsRenderNextAction(data); }); + + template.find('.feature[data-feature="forward"]').on('click', function() { + self.groupsRenderForward(data); + }); }, groupsRenderCallRecording: function(data) { @@ -775,6 +784,37 @@ define(function(require){ }); }, + + groupsRenderForward: function(data) { + var self = this, + featureTemplate = $(monster.template(self, 'groups-feature-forward', data)), + switchFeature = featureTemplate.find('.switch-state'), + popup; + + featureTemplate.find('.cancel-link').on('click', function() { + popup.dialog('close').remove(); + }); + + featureTemplate.find('.save').on('click', function() { + var enabled = switchFeature.prop('checked'); + + data.group.smartpbx = data.group.smartpbx || {}; + data.group.smartpbx.forward = data.group.smartpbx.forward || {}; + data.group.smartpbx.forward.enabled = enabled; + data.group.allow_forward = enabled; + + self.groupsUpdate(data.group, function(updatedGroup) { + popup.dialog('close').remove(); + self.groupsRender({ groupId: data.group.id }); + }); + }); + + popup = monster.ui.dialog(featureTemplate, { + title: data.group.extra.mapFeatures.forward.title, + position: ['center', 20] + }); + }, + groupsBindName: function(template, data) { var self = this, nameForm = template.find('#form-name'); diff --git a/views/groups-feature-forward.html b/views/groups-feature-forward.html new file mode 100644 index 0000000..90f898d --- /dev/null +++ b/views/groups-feature-forward.html @@ -0,0 +1,31 @@ +
+
+
+ +
+ {{ i18n.groups.forward.headline }} +
+ {{#monsterSwitch}} + + {{/monsterSwitch}} +
+
+ +
+
+
+
+

{{ i18n.groups.forward.description }}

+
+
+ + +
+
+ {{ i18n.cancel }} + +
+
+
\ No newline at end of file