Changeset 5929
- Timestamp:
- 07/07/08 00:48:48 (4 years ago)
- Files:
-
- modules/branches/2.5/voicemail/functions.inc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/voicemail/functions.inc.php
r5897 r5929 99 99 // Mailbox must be processed before adding / deleting users, therefore $sortorder = 1 100 100 $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 101 // JS function needed for checking voicemail = Enabled102 $js = 'return (theForm.vm.value == "enabled");';103 101 } elseif ($extdisplay != '' || $pagename == 'users') { 104 102 // We're now viewing an extension, so we need to display _and_ process. 105 103 voicemail_applyhooks(); 106 104 $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 105 // JS function needed for checking voicemail = Enabled 107 106 $js = 'return (theForm.vm.value == "enabled");'; 108 107 $currentcomponent->addjsfunc('isVoiceMailEnabled(notused)',$js); 108 // JS for verifying an empty password is OK 109 $msg = _('Voicemail is enabled but the Voicemail Password field is empty. Are you sure you wish to continue?'); 110 $js = 'if (theForm.vmpwd.value == "") { if(confirm("'.$msg.'")) { return true; } else { return false; } };'; 111 $currentcomponent->addjsfunc('verifyEmptyVoiceMailPassword(notused)', $js); 112 109 113 } 110 114 } … … 214 218 $section = 'Voicemail & Directory'; 215 219 $currentcomponent->addguielem($section, new gui_selectbox('vm', $currentcomponent->getoptlist('vmena'), $vmselect, _('Status'), '', false)); 216 $currentcomponent->addguielem($section, new gui_textbox('vmpwd', $vmpwd, _('Voicemail Password'), sprintf(_("This is the password used to access the voicemail system.%sThis password can only contain numbers.%sA user can change the password you enter here after logging into the voicemail system (%s) with a phone."),"<br /><br />","<br /><br />",$fc_vm), "frm_${display}_isVoiceMailEnabled() && ! isInteger()", $msgInvalidVmPwd, false));220 $currentcomponent->addguielem($section, new gui_textbox('vmpwd', $vmpwd, _('Voicemail Password'), sprintf(_("This is the password used to access the voicemail system.%sThis password can only contain numbers.%sA user can change the password you enter here after logging into the voicemail system (%s) with a phone."),"<br /><br />","<br /><br />",$fc_vm), "frm_${display}_isVoiceMailEnabled() && !frm_${display}_verifyEmptyVoiceMailPassword() && !isInteger()", $msgInvalidVmPwd, false)); 217 221 $currentcomponent->addguielem($section, new gui_textbox('email', $email, _('Email Address'), _("The email address that voicemails are sent to."), "frm_${display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true)); 218 222 $currentcomponent->addguielem($section, new gui_textbox('pager', $pager, _('Pager Email Address'), _("Pager/mobile email address that short voicemail notifcations are sent to."), "frm_${display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true));
