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'),
userId = currentUser.id,
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([
function(callback) {
@ -2339,7 +2342,15 @@ define(function(require) {
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);
return;
}
@ -2348,7 +2359,10 @@ define(function(require) {
data: {
voicemailId: vmbox.id,
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() {


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

@ -52,7 +52,7 @@
<div class="control-group extra">
<label class="fix-left">
{{#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}}
</label>
</div>


Loading…
Cancel
Save