From 05ef09d03ec033b55332b283302be3f9bee3f03e Mon Sep 17 00:00:00 2001 From: Maxime Roux Date: Fri, 5 Dec 2014 16:03:50 -0800 Subject: [PATCH] UI-727: Added an info box to let the user know why some restrictions are disabled --- i18n/en-US.json | 3 +- i18n/fr-FR.json | 3 +- submodules/devices/devices.css | 15 +++++++-- submodules/devices/devices.js | 1 + views/devices-ata.html | 58 ++++++++++++++++++++-------------- views/devices-fax.html | 58 ++++++++++++++++++++-------------- views/devices-mobile.html | 58 ++++++++++++++++++++-------------- views/devices-sip_device.html | 58 ++++++++++++++++++++-------------- views/devices-smartphone.html | 58 ++++++++++++++++++++-------------- views/devices-softphone.html | 58 ++++++++++++++++++++-------------- 10 files changed, 228 insertions(+), 142 deletions(-) diff --git a/i18n/en-US.json b/i18n/en-US.json index 0d88e7e..011d319 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -167,7 +167,8 @@ "denyMessage": "This device will not be allowed to place a call to {{phoneNumber}}." }, "__comment": "UI-727, v3.19_s2: Updating the way call restrictions are displayed on devices.", - "allow": "Allow" + "allow": "Allow", + "disabledRestrictionsInfo": "Some types of call have been restricted for your entire account and can not be enabled per-device." }, "video": { "menuTitle": "Video", diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json index deab910..3ed8401 100644 --- a/i18n/fr-FR.json +++ b/i18n/fr-FR.json @@ -149,7 +149,8 @@ "denyMessage": "Ce téléphone ne sera pas autorisé à appeler le numéro {{phoneNumber}}." }, "__comment": "UI-727, v3.19_s2: Updating the way call restrictions are displayed on devices.", - "allow": "Autoriser" + "allow": "Autoriser", + "disabledRestrictionsInfo": "Certains types d'appels on été bloqués pour votre compte et ne peuvent pas être activés sur vos téléphones." }, "video": { "menuTitle": "Vidéo", diff --git a/submodules/devices/devices.css b/submodules/devices/devices.css index 134343c..00d33b4 100644 --- a/submodules/devices/devices.css +++ b/submodules/devices/devices.css @@ -267,8 +267,12 @@ font-weight: bold; } +.edit-device .restrictions-container { + position: relative; +} + .edit-device .restriction-matcher-div { - margin-right: 50px; + margin-right: 40px; float: right; } @@ -291,12 +295,19 @@ .edit-device .restriction-message { width: 275px; - margin: 0 0 0 20px !important; + margin: 0 0 0 30px !important; padding: 10px; vertical-align: top; display: none; } +.edit-device .disabled-restrictions-info { + width: 270px; + position: absolute; + bottom: 0px; + right: 40px; +} + .edit-device .restriction-list .restriction-line.disabled .control-label { opacity: 0.5; cursor: default; diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index 44e79f8..d954caa 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -657,6 +657,7 @@ define(function(require){ && name in data.accountLimits.call_restriction && data.accountLimits.call_restriction[name].action === 'deny') { defaults.extra.restrictions[name].disabled = true; + defaults.extra.hasDisabledRestrictions = true; } if('call_restriction' in data.device && name in data.device.call_restriction) { diff --git a/views/devices-ata.html b/views/devices-ata.html index df6532e..f520b0b 100644 --- a/views/devices-ata.html +++ b/views/devices-ata.html @@ -93,32 +93,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}
diff --git a/views/devices-fax.html b/views/devices-fax.html index a3a25c1..ae9922a 100644 --- a/views/devices-fax.html +++ b/views/devices-fax.html @@ -104,32 +104,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}
diff --git a/views/devices-mobile.html b/views/devices-mobile.html index 764215d..7c8fdc8 100644 --- a/views/devices-mobile.html +++ b/views/devices-mobile.html @@ -131,32 +131,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}
diff --git a/views/devices-sip_device.html b/views/devices-sip_device.html index b4916a6..a1ee42e 100644 --- a/views/devices-sip_device.html +++ b/views/devices-sip_device.html @@ -167,32 +167,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}
diff --git a/views/devices-smartphone.html b/views/devices-smartphone.html index b7cecd5..23d90ba 100644 --- a/views/devices-smartphone.html +++ b/views/devices-smartphone.html @@ -159,32 +159,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}
diff --git a/views/devices-softphone.html b/views/devices-softphone.html index 549c33a..a4823a0 100644 --- a/views/devices-softphone.html +++ b/views/devices-softphone.html @@ -124,32 +124,44 @@
-
- - - -
-
- {{ i18n.devices.popupSettings.restrictions.sectionTitle }} -
-
- {{#each extra.restrictions}} -
- -
-
- +
+
+ + + +
+
+ {{ i18n.devices.popupSettings.restrictions.sectionTitle }} +
+
+ {{#each extra.restrictions}} +
+ +
+
+ +
+
-
+ {{/each}}
- {{/each}} -
-
+
+
+ {{#if extra.hasDisabledRestrictions}} +
+
+    +
+
+

{{ i18n.devices.popupSettings.restrictions.disabledRestrictionsInfo }}

+
+
+ {{/if}}