diff --git a/i18n/en-US.json b/i18n/en-US.json index 01ef634..a514bbe 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -711,7 +711,10 @@ "text": "A voicemail box will be available for this user.", "label": "Voicemail to e-mail:", "title": "Voicemail Box", - "vmToEmailHelp": "An e-mail will be sent to {{variable}} for every new voicemail. If you want to change where email notifications go to, please edit the user's email address in the User Administration section." + "vmToEmailHelp": "An e-mail will be sent to {{variable}} for every new voicemail. If you want to change where email notifications go to, please edit the user's email address in the User Administration section.", + "announceOnly": "Announce Only", + "transcribe": "Transcribe", + "attach_voicemail": "Attach voicemail message to email." }, "find_me_follow_me": { "title": "Find me, Follow me", @@ -1427,6 +1430,18 @@ "label": "Configurable via Menu?", "help": " If unchecked, it will disallow the user to configure voicemail via the menu" }, + "transcription": { + "label": "Transcribe Messages", + "help": "Control recent enhancements to the voicemail system" + }, + "announceOnly": { + "label": "Announce only-mode", + "help": "Set a voicemail box to announce-only mode" + }, + "emailAsAttachment": { + "label": "Attach messages to e-mail", + "help": "E-mail not having the message as an attachment" + }, "__comment": "UI-2634: add support for wav/mp4/mp3 for voicemail media extensions", "__version": "4.1", "mediaExtension": { diff --git a/submodules/users/users.js b/submodules/users/users.js index 25c97e3..f1e70b4 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -2270,14 +2270,26 @@ define(function(require) { usersRenderVMBox: function(currentUser, vmbox) { var self = this, vmboxActive = currentUser.extra.mapFeatures.vmbox.active, + transcription = monster.util.getCapability('voicemail.transcription'), + announcement_only = _.get(vmbox, 'announcement_only', false), + vm_to_email_enabled = currentUser.vm_to_email_enabled, + transcribe = _.get(vmbox, 'transcribe', transcription.defaultValue), featureTemplate = $(self.getTemplate({ name: 'feature-vmbox', - data: currentUser, + data: _.merge(currentUser, { + vm_to_email_enabled: announcement_only ? false : vm_to_email_enabled, + vmbox: _.merge(vmbox, { + transcribe: announcement_only ? false : transcribe, + announcement_only: announcement_only + }) + }), submodule: 'users' })), switchFeature = featureTemplate.find('.switch-state'), featureForm = featureTemplate.find('#vmbox_form'), - switchVmToEmail = featureForm.find('#vm_to_email_enabled'); + switchVmToEmail = featureForm.find('#vm_to_email_enabled'), + switchVmTranscribe = featureForm.find('#transcribe'), + switchVmAnnounceOnly = featureForm.find('#announcement_only'); monster.ui.validate(featureForm); @@ -2293,6 +2305,18 @@ define(function(require) { $(this).prop('checked') ? featureForm.find('.extra-content').slideDown() : featureForm.find('.extra-content').slideUp(); }); + switchVmAnnounceOnly.on('change', function() { + var isEnabled = $(this).prop('checked'); + + switchVmTranscribe + .prop('checked', isEnabled ? false : transcribe) + .prop('disabled', isEnabled); + + switchVmToEmail + .prop('checked', isEnabled ? false : vm_to_email_enabled) + .prop('disabled', isEnabled); + }); + featureTemplate.find('.save').on('click', function() { if (!monster.ui.valid(featureForm)) { return; diff --git a/submodules/users/users.scss b/submodules/users/users.scss index 271b1e7..3ec8e31 100644 --- a/submodules/users/users.scss +++ b/submodules/users/users.scss @@ -1009,7 +1009,6 @@ &.main{ display: flex; flex-direction: row; - justify-content: center; align-items: center; padding-bottom: 15px; @@ -1017,6 +1016,8 @@ font-size: 1em; padding-right: 1em; margin-bottom: 0px; + width: 200px; + text-align: right; } } diff --git a/submodules/users/views/feature-vmbox.html b/submodules/users/views/feature-vmbox.html index 4f4dac6..be5ae95 100644 --- a/submodules/users/views/feature-vmbox.html +++ b/submodules/users/views/feature-vmbox.html @@ -22,6 +22,24 @@ {{i18n.users.vmbox.text}} +