Ticket #2593: functions.inc.php.patch

File functions.inc.php.patch, 3.0 kB (added by dgorski, 5 months ago)

patch for modules/voicemail/functions.inc.php (2.4.0.1) with confirmation dialog

  • functions.inc.php-2.4.0.1

    old new  
    9898                // ** WARNING ** 
    9999                // Mailbox must be processed before adding / deleting users, therefore $sortorder = 1 
    100100                $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 
    101                 // JS function needed for checking voicemail = Enabled 
    102                 $js = 'return (theForm.vm.value == "enabled");'; 
    103101        } elseif ($extdisplay != '' || $pagename == 'users') {  
    104102        // We're now viewing an extension, so we need to display _and_ process.  
    105103                voicemail_applyhooks();  
    106104                $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 
     105                // JS function needed for checking voicemail = Enabled 
    107106                $js = 'return (theForm.vm.value == "enabled");'; 
    108107                $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 
    109113        }  
    110114}  
    111115 
     
    213217 
    214218                $section = 'Voicemail & Directory'; 
    215219                $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)); 
    217221                $currentcomponent->addguielem($section, new gui_textbox('email', $email, _('Email Address'), _("The email address that voicemails are sent to."), "frm_${display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true)); 
    218222                $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)); 
    219223                $currentcomponent->addguielem($section, new gui_radio('attach', $currentcomponent->getoptlist('vmyn'), $vmops_attach, _('Email Attachment'), _("Option to attach voicemails to email."))); 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads