Changeset 3120

Show
Ignore:
Timestamp:
11/20/06 14:26:56 (2 years ago)
Author:
qldrob
Message:

Add support for placement of guielements, and set some reasonably sane defaults.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/components.class.php

    r3119 r3120  
    4747                        default: 
    4848                                $this->_guielems_middle[$section][$sortorder][] = $guielem; 
    49                                 if (!isset($placement)) { 
    50                                         $this->_guielems_middle[$section]['placement'] = $sortorder; 
    51                                 } else { 
    52                                         $this->_guielems_middle[$section]['placement'] = $placement; 
     49                                if (!isset($this->_guielems_middle[$section]['placement'])) { 
     50                                        if (!isset($placement)) { 
     51                                                $this->_guielems_middle[$section]['placement'] = $sortorder; 
     52                                        } else { 
     53                                                $this->_guielems_middle[$section]['placement'] = $placement; 
     54                                        } 
    5355                                } 
    5456                                break; 
  • freepbx/trunk/amp_conf/htdocs/admin/modules/core/functions.inc.php

    r3064 r3120  
    23152315                } 
    23162316                if ( $extdisplay ) { 
    2317                         $currentcomponent->addguielem($section, new gui_hidden('extension', $extdisplay)); 
     2317                        $currentcomponent->addguielem($section, new gui_hidden('extension', $extdisplay), 2); 
    23182318                } else { 
    2319                         $currentcomponent->addguielem($section, new gui_textbox('extension', $extdisplay, 'User Extension', 'The extension number to dial to reach this user.', '!isInteger()', $msgInvalidExtNum, false)); 
     2319                        $currentcomponent->addguielem($section, new gui_textbox('extension', $extdisplay, 'User Extension', 'The extension number to dial to reach this user.', '!isInteger()', $msgInvalidExtNum, false), 3); 
    23202320                } 
    23212321                if ( $display != 'extensions' ) { 
     
    23272327                 
    23282328                $section = 'Extension Options'; 
    2329                 $currentcomponent->addguielem($section, new gui_textbox('directdid', $directdid, 'Direct DID', "The direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>Leave this field blank to disable the direct DID feature for this extension. All non-numeric characters will be stripped.")); 
     2329                $currentcomponent->addguielem($section, new gui_textbox('directdid', $directdid, 'Direct DID', "The direct DID that is associated with this extension. The DID should be in the same format as provided by the provider (e.g. full number, 4 digits for 10x4, etc).<br><br>Format should be: <b>XXXXXXXXXX</b><br><br>Leave this field blank to disable the direct DID feature for this extension. All non-numeric characters will be stripped."), 3); 
    23302330                $currentcomponent->addguielem($section, new gui_textbox('didalert', $didalert, 'DID Alert Info', "Alert Info can be used for distinctive ring on SIP phones. Set this value to the desired Alert Info to be sent to the phone when this DID is called. Leave blank to use default values. Will have no effect if no Direct DID is set")); 
    23312331                $currentcomponent->addguielem($section, new gui_textbox('outboundcid', $outboundcid, 'Outbound CID', "Overrides the caller id when dialing out a trunk. Any setting here will override the common outbound caller id set in the Trunks admin.<br><br>Format: <b>\"caller name\" &lt;#######&gt;</b><br><br>Leave this field blank to disable the outbound callerid feature for this user.", '!isCallerID()', $msgInvalidOutboundCID, true)); 
     
    23372337                $section = 'Fax Handling'; 
    23382338                $wait = (isset($wait) ? $wait : '0'); 
    2339                 $currentcomponent->addguielem($section, new gui_selectbox('faxexten', $currentcomponent->getoptlist('faxdestoptions'), $faxexten, 'Fax Extension', "Select 'system' to have the system receive and email faxes.<br><br>The freePBX default is defined in General Settings.", false)); 
     2339                $currentcomponent->addguielem($section, new gui_selectbox('faxexten', $currentcomponent->getoptlist('faxdestoptions'), $faxexten, 'Fax Extension', "Select 'system' to have the system receive and email faxes.<br><br>The freePBX default is defined in General Settings.", false), 4); 
    23402340                $currentcomponent->addguielem($section, new gui_textbox('faxemail', $faxemail, 'Fax Email', "Email address is used if 'system' has been chosen for the fax extension above.<br><br>Leave this blank to use the freePBX default in General Settings")); 
    23412341                $currentcomponent->addguielem($section, new gui_selectbox('answer', $currentcomponent->getoptlist('faxdetecttype'), $answer, 'Fax Detection Type', "Selecting Zaptel or NVFax will immediately answer the call and play ringing tones to the caller for the number of seconds in Pause below. Use NVFax on SIP or IAX trunks.", false)); 
     
    23442344                $section = 'Privacy'; 
    23452345                $privacyman = (isset($privacyman) ? $privacyman : '0'); 
    2346                 $currentcomponent->addguielem($section, new gui_selectbox('privacyman', $currentcomponent->getoptlist('privyn'), $privacyman, 'Privacy Manager', "If no Caller ID is sent, Privacy Manager will asks the caller to enter their 10 digit phone number. The caller is given 3 attempts.", false)); 
     2346                $currentcomponent->addguielem($section, new gui_selectbox('privacyman', $currentcomponent->getoptlist('privyn'), $privacyman, 'Privacy Manager', "If no Caller ID is sent, Privacy Manager will asks the caller to enter their 10 digit phone number. The caller is given 3 attempts.", false), 4); 
    23472347 
    23482348        } 
     
    25882588                         
    25892589                        if ( $devoptarr['level'] == 0 || ($extdisplay && $devoptarr['level'] == 1) ) { // editing to show advanced as well 
    2590                                 $currentcomponent->addguielem($section, new gui_textbox($devopname, $devoptcurrent, $devopt, '', $devoptjs, $devoptfailmsg)); 
     2590                                $currentcomponent->addguielem($section, new gui_textbox($devopname, $devoptcurrent, $devopt, '', $devoptjs, $devoptfailmsg), 4); 
    25912591                        } else { // add so only basic 
    2592                                 $currentcomponent->addguielem($section, new gui_hidden($devopname, $devoptcurrent)); 
     2592                                $currentcomponent->addguielem($section, new gui_hidden($devopname, $devoptcurrent), 4); 
    25932593                        } 
    25942594                         
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads