Browse Source

[4.3] MSPB-68: Fix user vmbox transcribe (#182)

4.3
Ricardo Merino 6 years ago
committed by GitHub
parent
commit
5f1c2a0fd6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions
  1. +17
    -3
      submodules/users/users.js
  2. +1
    -1
      submodules/users/views/feature-vmbox.html

+ 17
- 3
submodules/users/users.js View File

@ -2326,7 +2326,10 @@ define(function(require) {
formData = monster.ui.getFormData('vmbox_form'), formData = monster.ui.getFormData('vmbox_form'),
userId = currentUser.id, userId = currentUser.id,
vmToEmailEnabled = enabled && formData.vm_to_email_enabled, vmToEmailEnabled = enabled && formData.vm_to_email_enabled,
deleteAfterNotify = vmToEmailEnabled && formData.delete_after_notify;
deleteAfterNotify = vmToEmailEnabled && formData.delete_after_notify,
transcribe = formData.transcribe,
include_message_on_notify = formData.include_message_on_notify,
vm_to_email_enabled = formData.include_message_on_notify;
monster.waterfall([ monster.waterfall([
function(callback) { function(callback) {
@ -2339,7 +2342,15 @@ define(function(require) {
return; return;
} }
if (!vmbox || vmbox.delete_after_notify === deleteAfterNotify) {
if (
!vmbox
|| (
vmbox.delete_after_notify === deleteAfterNotify
&& vmbox.transcribe === transcribe
&& vmbox.include_message_on_notify === include_message_on_notify
&& vmbox.vm_to_email_enabled === vm_to_email_enabled
)
) {
callback(null); callback(null);
return; return;
} }
@ -2348,7 +2359,10 @@ define(function(require) {
data: { data: {
voicemailId: vmbox.id, voicemailId: vmbox.id,
data: { data: {
delete_after_notify: deleteAfterNotify
delete_after_notify: deleteAfterNotify,
transcribe: transcribe,
include_message_on_notify: include_message_on_notify,
vm_to_email_enabled: vm_to_email_enabled
} }
}, },
success: function() { success: function() {


+ 1
- 1
submodules/users/views/feature-vmbox.html View File

@ -52,7 +52,7 @@
<div class="control-group extra"> <div class="control-group extra">
<label class="fix-left"> <label class="fix-left">
{{#monsterCheckbox i18n.users.vmbox.attach_voicemail}} {{#monsterCheckbox i18n.users.vmbox.attach_voicemail}}
<input type="checkbox" name="delete_after_notify"{{#if extra.deleteAfterNotify}} checked{{/if}}></input>
<input type="checkbox" name="include_message_on_notify" {{#if vmbox.include_message_on_notify}} checked{{/if}}></input>
{{/monsterCheckbox}} {{/monsterCheckbox}}
</label> </label>
</div> </div>


Loading…
Cancel
Save