From 7a8045fd41ef4293ae84440cab69d8d117403a68 Mon Sep 17 00:00:00 2001 From: Jean-Roch Maitre Date: Tue, 29 Sep 2015 13:23:15 -0700 Subject: [PATCH] UI-1818: Added suppress unregister notification field to smartpbx --- i18n/en-US.json | 6 ++++++ submodules/devices/devices.css | 5 +++++ submodules/devices/devices.js | 6 +++++- views/devices-fax.html | 9 +++++++++ views/devices-sip_device.html | 11 ++++++++++- 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/i18n/en-US.json b/i18n/en-US.json index bf85e37..5c22f98 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -203,6 +203,12 @@ "button": "Restart", "help": "This sends a request to restart the device. This action is only available if the device is currently registered to the platform.", "success": "You successfully sent a Restart request to this device!" + }, + "__comment": "UI-1818: Adding notify unregister", + "__version": "3.22", + "unregisterNotifications": { + "label": "Notify when unregistered", + "help": "Do you want to notify the administrator each time this device unregisters?" } }, "restrictions": { diff --git a/submodules/devices/devices.css b/submodules/devices/devices.css index f833ebe..5703af9 100644 --- a/submodules/devices/devices.css +++ b/submodules/devices/devices.css @@ -401,4 +401,9 @@ /* Restart Button */ .edit-device #restart_device { margin-left: 10px; +} + +/* Special checkbox case */ +.edit-device .form-horizontal .control-label.checkbox-basic { + margin-left: 160px; } \ No newline at end of file diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index 7568e9e..4ade4b7 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -598,6 +598,10 @@ define(function(require){ } } + if(mergedData.extra.hasOwnProperty('notify_unregister')) { + mergedData.suppress_unregister_notifications = !mergedData.extra.notify_unregister; + } + if(hasCodecs) { if(audioCodecs) { mergedData.media.audio.codecs = audioCodecs.getSelectedItems(); @@ -669,7 +673,7 @@ define(function(require){ codecs: [] } }, - suppress_unregister_notifications: false + suppress_unregister_notifications: true }, typedDefaults = { sip_device: { diff --git a/views/devices-fax.html b/views/devices-fax.html index 4a66083..677b089 100644 --- a/views/devices-fax.html +++ b/views/devices-fax.html @@ -70,6 +70,15 @@ + +
+ +
diff --git a/views/devices-sip_device.html b/views/devices-sip_device.html index a1bdf21..3e338af 100644 --- a/views/devices-sip_device.html +++ b/views/devices-sip_device.html @@ -203,12 +203,21 @@
+
+ +
+