Changeset 11668

Show
Ignore:
Timestamp:
03/04/11 00:32:39 (2 years ago)
Author:
p_lindheimer
Message:

fixes #4884 allows FreePBX to set various options and ARI settings will preserve but hide what is in FreePBX

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.9/amp_conf/htdocs/recordings/modules/settings.module

    r10317 r11668  
    4848    ), 
    4949/* until some parsing of available formats is enabled, hide this option 
     50*/ 
    5051  "attachfmt" => array( 
    5152    "type" => "email", 
    5253    "label" => _("Email attachment format"), 
    5354    "tooltip" => _("Audio format of message to attach to email."), 
    54     "input_type" => "text", 
     55    "input_type" => "hidden", 
    5556    "input_size" => 20 
    5657    ), 
    57 */ 
    5858  "backupdeleted" => array( 
    5959    "type" => "files", 
     
    6464    ), 
    6565/* allowing users to specify context is security issue, hide this option 
     66*/ 
    6667  "callback" => array( 
    6768    "type" => "phone", 
    6869    "label" => _("Call back context"), 
    6970    "tooltip" => _("Dialing context used for calling back the caller that left a message."), 
    70     "input_type" => "text", 
     71    "input_type" => "hidden", 
    7172    "input_size" => 80 
    7273    ), 
    73 */ 
    7474  "delete" => array( 
    7575    "type" => "email", 
     
    8080    ), 
    8181/* allowing users to specify context is security issue, hide this option 
     82*/ 
    8283  "dialout" => array( 
    8384    "type" => "phone", 
    8485    "label" => _("Dial out context"), 
    8586    "tooltip" => _("Dialing context used to dial out from voicemail."), 
    86     "input_type" => "text", 
     87    "input_type" => "hidden", 
    8788    "input_size" => 80 
    8889    ), 
    89 */ 
    9090  "envelope" => array( 
    9191    "type" => "phone", 
     
    9696    ), 
    9797/* allowing users to specify context is security issue, hide this option 
     98*/ 
    9899  "exitcontext" => array( 
    99100    "type" => "phone", 
    100101    "label" => _("Operator context"), 
    101102    "tooltip" => _("Dialing context for handling * or 0 calls to operator from voicemail."), 
    102     "input_type" => "text", 
     103    "input_type" => "hidden", 
    103104    "input_size" => 80 
    104105    ), 
     106/* forcegreetings and forcename should only be modified by voicemail admin, hide these options 
    105107*/ 
    106 /* forcegreetings and forcename should only be modified by voicemail admin, hide these options 
    107108  "forcegreetings" => array( 
    108109    "type" => "phone", 
    109110    "label" => _("Force greeting recording"), 
    110111    "tooltip" => _("Forces a new user to record a greeting. A new user is determined by the password being the same as the mailbox number."), 
    111     "input_type" => "checkbox", 
     112    "input_type" => "hidden", 
    112113    "input_size" => null 
    113114    ), 
     
    116117    "label" => _("Force name recording"), 
    117118    "tooltip" => _("Forces a new user to record their name. A new user is determined by the password being the same as the mailbox number."), 
    118     "input_type" => "checkbox", 
     119    "input_type" => "hidden", 
    119120    "input_size" => null 
    120121    ), 
    121 */ 
    122122/* this option is not used by app_voicemail.c, but by app_directory.c 
    123123   FreePBX does not use app_directory.c, so hide this option 
     
    132132/* imap options are only effective if using imap voicemail storage 
    133133   FreePBX does not support imap voiceemail storage, so hide these options 
     134*/ 
    134135  "imappassword" => array( 
    135136    "type" => "imap", 
    136137    "label" => _("IMAP email account password"), 
    137138    "tooltip" => _("Password for the IMAP email account used to store voicemail messages."), 
    138     "input_type" => "text", 
     139    "input_type" => "hidden", 
    139140    "input_size" => 80 
    140141    ), 
     
    143144    "label" => _("IMAP email user name"), 
    144145    "tooltip" => _("User name for the IMAP email account used to store voicemail messages."), 
    145     "input_type" => "text", 
     146    "input_type" => "hidden", 
    146147    "input_size" => 80 
    147148    ), 
    148 */ 
    149149/* user can break voicemail for self by switching to a language the server 
    150150   is not configured for, so hide this option 
     151*/ 
    151152  "language" => array( 
    152153    "type" => "phone", 
    153154    "label" => _("Voice prompt language"), 
    154155    "tooltip" => _("Enter language code to use for voice prompts. Before non-English languages can be used, the voice prompts must be installed by the system administrator."), 
    155     "input_type" => "text", 
     156    "input_type" => "hidden", 
    156157    "input_size" => 20 
    157158    ), 
    158 */ 
    159159  "maxmsg" => array( 
    160160    "type" => "files", 
     
    180180    ), 
    181181/* operator destination may not be available on a system, so hide this option 
     182*/ 
    182183  "operator" => array( 
    183184    "type" => "caller", 
    184185    "label" => _("Dial 0 for Operator"), 
    185186    "tooltip" => _("Allow caller to reach an operator by pressing 0 before, after, or while leaving a voicemail."), 
    186     "input_type" => "checkbox", 
     187    "input_type" => "hidden", 
    187188    "input_size" => null 
    188189    ), 
    189 */ 
    190190  "review" => array( 
    191191    "type" => "caller", 
     
    217217    ), 
    218218/* administrator may not want user to be able to change this, so hide this option 
     219*/ 
    219220  "sendvoicemail" => array( 
    220221    "type" => "phone", 
    221222    "label" => _("Send internal voicemail"), 
    222223    "tooltip" => _("Allow a user logged into voicemail to compose and send voicemail messages to other voicemail users."), 
    223     "input_type" => "checkbox", 
     224    "input_type" => "hidden", 
    224225    "input_size" => null 
    225226    ), 
    226 */ 
    227227  "serveremail" => array( 
    228228    "type" => "email", 
     
    240240    ), 
    241241/* timezone names are custom per installtion, so hide this option 
     242*/ 
    242243  "tz" => array( 
    243244    "type" => "phone", 
    244245    "label" => _("Timezone"), 
    245246    "tooltip" => _("Timezone from zonemessages context. Irrelevant if Envelope is disabled."), 
    246     "input_type" => "text", 
     247    "input_type" => "hidden", 
    247248    "input_size" => 80 
    248249    ), 
    249 */ 
    250250  "volgain" => array( 
    251251    "type" => "email", 
     
    308308  function is_textbox($opt) { 
    309309    if ($this->voicemail_options_table[$opt]["input_type"] == "text") { 
     310      return true; 
     311    } else { 
     312      return false; 
     313    } 
     314  } 
     315  function is_hidden($opt) { 
     316    if ($this->voicemail_options_table[$opt]["input_type"] == "hidden") { 
    310317      return true; 
    311318    } else { 
     
    905912          } 
    906913        } 
     914        else if ($this->is_hidden($key)) { 
     915          $current_option_text_input = "input type=hidden name='" . $var . "' value='" . $value . "' "; 
     916          $other_opts_text .= "<tr><td colspan='3'><" . $current_option_text_input . "></td></tr>"; 
     917        } 
    907918        else if ($this->is_checkbox($key)) { 
    908919          $current_option_text_input = "input " . $$var_enable . " " . $$var_text_box_options . " type=checkbox name='" . $var . "' value='yes'";