Changeset 269

Show
Ignore:
Timestamp:
04/11/08 00:31:51 (9 months ago)
Author:
shupp
Message:

CS fixes for Main_Limits

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Framework/Module/Main/Limits.php

    r243 r269  
    66 * PHP Version 5.1.0+ 
    77 *  
    8  * @uses      ToasterAdmin_Auth_System 
    9  * @category  Mail 
    10  * @package   ToasterAdmin 
    11  * @author    Bill Shupp <hostmaster@shupp.org>  
    12  * @copyright 2007 Bill Shupp 
    13  * @license   GPL 2.0  {@link http://www.gnu.org/licenses/gpl.txt} 
    14  * @link      http://trac.merchbox.com/trac/toasteradmin 
     8 * @uses       ToasterAdmin_Auth_System 
     9 * @category   Mail 
     10 * @package    ToasterAdmin 
     11 * @subpackage Module 
     12 * @author     Bill Shupp <hostmaster@shupp.org>  
     13 * @copyright  2007-2008 Bill Shupp 
     14 * @license    GPL 2.0  {@link http://www.gnu.org/licenses/gpl.txt} 
     15 * @link       http://trac.merchbox.com/trac/toasteradmin 
    1516 */ 
    1617 
     
    2021 * Modify IP Maps 
    2122 *  
    22  * @uses      ToasterAdmin_Auth_System 
    23  * @category  Mail 
    24  * @package   ToasterAdmin 
    25  * @author    Bill Shupp <hostmaster@shupp.org>  
    26  * @copyright 2007 Bill Shupp 
    27  * @license   GPL 2.0  {@link http://www.gnu.org/licenses/gpl.txt} 
    28  * @link      http://trac.merchbox.com/trac/toasteradmin 
     23 * @uses       ToasterAdmin_Auth_System 
     24 * @category   Mail 
     25 * @package    ToasterAdmin 
     26 * @subpackage Module 
     27 * @author     Bill Shupp <hostmaster@shupp.org>  
     28 * @copyright  2007-2008 Bill Shupp 
     29 * @license    GPL 2.0  {@link http://www.gnu.org/licenses/gpl.txt} 
     30 * @link       http://trac.merchbox.com/trac/toasteradmin 
    2931 */ 
    3032class Framework_Module_Main_Limits extends ToasterAdmin_Auth_System 
     
    113115            $defaults['default_quota'] = ($defaults['default_quota'] / 1024) / 1024; 
    114116        } 
    115         $form = new HTML_QuickForm('limitsForm', 'post', './?module=Main&class=Limits&event=modifyLimitsNow&domain=' . $this->domain); 
     117        $url  = './?module=Main&class=Limits&event=modifyLimitsNow&domain='; 
     118        $url .= $this->domain; 
     119        $form = new HTML_QuickForm('limitsForm', 'post', $url); 
    116120        $form->setDefaults($defaults); 
    117121 
    118         $form->addElement('text', 'max_aliases', _('Maximum Aliases (-1 for unlimited)'), array('size' => 4)); 
    119         $form->addElement('text', 'max_forwards', _('Maximum Forwards (-1 for unlimited)'), array('size' => 4)); 
    120         $form->addElement('text', 'max_autoresponders', _('Maximum Mail Robots (-1 for unlimited)'), array('size' => 4)); 
    121         $form->addElement('text', 'max_mailinglists', _('Maximum EZMLM-IDX Mailing Lists (-1 for unlimited)'), array('size' => 4)); 
    122         $form->addElement('text', 'default_quota', _('Default Quota in MB (0 for unlimited)'), array('size' => 4)); 
    123         $form->addElement('text', 'default_maxmsgcount', _('Default Message Count Limit (0 for unlimited)'), array('size' => 4)); 
     122        $form->addElement('text', 'max_aliases', 
     123            _('Maximum Aliases (-1 for unlimited)'), array('size' => 4)); 
     124        $form->addElement('text', 'max_forwards', 
     125            _('Maximum Forwards (-1 for unlimited)'), array('size' => 4)); 
     126        $form->addElement('text', 'max_autoresponders', 
     127            _('Maximum Mail Robots (-1 for unlimited)'), array('size' => 4)); 
     128        $form->addElement('text', 'max_mailinglists', 
     129            _('Maximum EZMLM-IDX Mailing Lists (-1 for unlimited)'), 
     130            array('size' => 4)); 
     131        $form->addElement('text', 'default_quota', 
     132            _('Default Quota in MB (0 for unlimited)'), array('size' => 4)); 
     133        $form->addElement('text', 'default_maxmsgcount', 
     134            _('Default Message Count Limit (0 for unlimited)'), 
     135            array('size' => 4)); 
    124136        $form->addElement('checkbox', 'disable_pop', _('Disable POP')); 
    125137        $form->addElement('checkbox', 'disable_imap', _('Disable IMAP')); 
    126138        $form->addElement('checkbox', 'disable_dialup', _('Disable Dial-Up')); 
    127         $form->addElement('checkbox', 'disable_password_changing', _('Disable Password Changing')); 
    128         $form->addElement('checkbox', 'disable_webmail', _('Disable Webmail (SqWebmail)')); 
    129         $form->addElement('checkbox', 'disable_external_relay', _('Disable Relaying')); 
    130         $form->addElement('checkbox', 'disable_smtp', _('Disable SMTP-AUTH')); 
     139        $form->addElement('checkbox', 'disable_password_changing', 
     140            _('Disable Password Changing')); 
     141        $form->addElement('checkbox', 'disable_webmail', 
     142            _('Disable Webmail (SqWebmail)')); 
     143        $form->addElement('checkbox', 'disable_external_relay', 
     144            _('Disable Relaying')); 
     145        $form->addElement('checkbox', 'disable_smtp', 
     146            _('Disable SMTP-AUTH')); 
    131147        $form->addElement('submit', 'submit', _('Modify')); 
    132148 
    133149        $form->registerRule('minusOne', 'regex', '/^(-1|[0-9]+)$/'); 
    134150        $form->registerRule('zero', 'regex', '/^(0|[1-9][0-9]+)$/'); 
    135         $form->addRule('max_aliases', _('Error: only integers of -1 and greater allowed here'), 'minusOne', null, 'client'); 
    136         $form->addRule('max_forwards', _('Error: only integers of -1 and greater allowed here'), 'minusOne', null, 'client'); 
    137         $form->addRule('max_autoresponders', _('Error: only integers of -1 and greater allowed here'), 'minusOne', null, 'client'); 
    138         $form->addRule('max_mailinglists', _('Error: only integers of -1 and greater allowed here'), 'minusOne', null, 'client'); 
    139         $form->addRule('default_quota', _('Error: only integers of 0 and greater allowed here'), 'zero', null, 'client'); 
    140         $form->addRule('default_maxmsgcount', _('Error: only integers of 0 and greater allowed here'), 'zero', null, 'client'); 
     151        $form->addRule('max_aliases', 
     152            _('Error: only integers of -1 and greater allowed here'), 
     153            'minusOne', null, 'client'); 
     154        $form->addRule('max_forwards', 
     155            _('Error: only integers of -1 and greater allowed here'), 
     156            'minusOne', null, 'client'); 
     157        $form->addRule('max_autoresponders', 
     158            _('Error: only integers of -1 and greater allowed here'), 
     159            'minusOne', null, 'client'); 
     160        $form->addRule('max_mailinglists', 
     161            _('Error: only integers of -1 and greater allowed here'), 
     162            'minusOne', null, 'client'); 
     163        $form->addRule('default_quota', 
     164            _('Error: only integers of 0 and greater allowed here'), 
     165            'zero', null, 'client'); 
     166        $form->addRule('default_maxmsgcount', 
     167            _('Error: only integers of 0 and greater allowed here'), 
     168            'zero', null, 'client'); 
    141169        $form->applyFilter('__ALL__', 'trim'); 
    142170 
  • trunk/Framework/Module/Main/Templates/Default/limits.tpl

    r246 r269  
    1010<br /> 
    1111<a href="./?module=Domains">{t}Domains {/t}</a> |  
    12 <a href="./?module=Main">{$LANG_Main_Menu}</a> 
     12<a href="./?module=Main">{t}Main Menu{/t}</a> 
    1313</div> 
    1414<div class="boxbottom"></div>