Changeset 239

Show
Ignore:
Timestamp:
01/08/08 01:09:57 (1 year ago)
Author:
shupp
Message:

fixes in find domain so that server side validation works properly

Files:

Legend:

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

    r233 r239  
    5050    { 
    5151        $this->setData('LANG_Main_Menu', _('Main Menu')); 
    52         $this->setData('findForm', $this->findForm()->toHtml());     
    53         $this->tplFile = 'find.tpl'
     52        $form = $this->_findForm(); 
     53        $this->_renderForm($form)
    5454        return; 
    5555    } 
     
    6565    { 
    6666        $this->setData('LANG_Main_Menu', _('Main Menu')); 
    67         $form = $this->findForm(); 
     67        $form = $this->_findForm(); 
    6868        if (!$form->validate()) { 
    69             return $this->find(); 
     69            $this->_renderForm($form); 
     70            return; 
    7071        } 
    71         $this->setData('findForm', $this->findForm()->toHtml());     
     72        $this->_renderForm($form); 
    7273        $domain = $form->getElementValue('domain'); 
    7374        $this->setData('domain', $domain); 
     
    8182            $this->setData('edit_url', "./?module=Domains&class=Menu&domain=$domain"); 
    8283        } 
    83         // Display find form 
    84         $this->tplFile = 'find.tpl'; 
    85         return; 
    8684    } 
    8785    /** 
    88      * findForm  
     86     * _findForm  
    8987     *  
    9088     * Generate find form 
     
    9391     * @return void 
    9492     */ 
    95     private function findForm() 
     93    private function _findForm() 
    9694    { 
    9795        $form = new HTML_QuickForm('formFind', 'post', './?module=Main&class=Find&event=findNow'); 
     
    105103        return $form; 
    106104    } 
     105 
     106    /** 
     107     * _renderForm  
     108     *  
     109     * @param mixed $form  
     110     * @access private 
     111     * @return void 
     112     */ 
     113    private function _renderForm($form) 
     114    { 
     115        $this->setData('findForm', $form->toHtml()); 
     116        // Display find form 
     117        $this->tplFile = 'find.tpl'; 
     118    } 
    107119} 
    108120?>