Changeset 5929

Show
Ignore:
Timestamp:
07/07/08 00:48:48 (4 years ago)
Author:
mbrevda
Message:

#2593

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/voicemail/functions.inc.php

    r5897 r5929  
    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}  
     
    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));