Browse Source

UI-1818: Added suppress unregister notification field to smartpbx

4.3
Jean-Roch Maitre 10 years ago
parent
commit
7a8045fd41
5 changed files with 35 additions and 2 deletions
  1. +6
    -0
      i18n/en-US.json
  2. +5
    -0
      submodules/devices/devices.css
  3. +5
    -1
      submodules/devices/devices.js
  4. +9
    -0
      views/devices-fax.html
  5. +10
    -1
      views/devices-sip_device.html

+ 6
- 0
i18n/en-US.json View File

@ -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": {


+ 5
- 0
submodules/devices/devices.css View File

@ -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;
}

+ 5
- 1
submodules/devices/devices.js View File

@ -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: {


+ 9
- 0
views/devices-fax.html View File

@ -70,6 +70,15 @@
</select>
</div>
</div>
<div class="control-group">
<label class="control-label checkbox checkbox-basic">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.unregisterNotifications.label }}
<input type="checkbox" name="extra.notify_unregister" id="notify_unregister" {{#unless suppress_unregister_notifications}}checked{{/unless}} />
{{/monsterCheckbox}}
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.miscellaneous.unregisterNotifications.help}}" data-placement="top" data-toggle="tooltip"></i>
</label>
</div>
</div>
<div class="tabs-section clearfix" data-section="audio">


+ 10
- 1
views/devices-sip_device.html View File

@ -203,12 +203,21 @@
<div class="control-group">
<label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.label }}
<input type="checkbox" name="ignore_completed_elsewhere" id="ignore_completed_elsewhere" {{#if ignore_completed_elsewhere }}checked{{/if}} />
<input type="checkbox" name="ignore_completed_elsewhere" id="ignore_completed_elsewhere" {{#if ignore_completed_elsewhere }}checked{{/if}}/>
{{/monsterCheckbox}}
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.miscellaneous.ignoreCompletedElsewhere.help}}" data-placement="top" data-toggle="tooltip"></i>
</label>
</div>
<div class="control-group">
<label class="control-label checkbox">
{{#monsterCheckbox i18n.devices.popupSettings.miscellaneous.unregisterNotifications.label }}
<input type="checkbox" name="extra.notify_unregister" id="notify_unregister" {{#unless suppress_unregister_notifications}}checked{{/unless}} />
{{/monsterCheckbox}}
<i class="help-popover fa fa-question-circle fa-lg" data-original-title="{{i18n.devices.popupSettings.miscellaneous.unregisterNotifications.help}}" data-placement="top" data-toggle="tooltip"></i>
</label>
</div>
<div class="rtp-line clearfix">
<div class="control-group">
<label class="control-label checkbox">


Loading…
Cancel
Save