Changeset 240

Show
Ignore:
Timestamp:
01/08/08 01:34:06 (1 year ago)
Author:
shupp
Message:

fixes in add domain so that server side validation works properly

Files:

Legend:

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

    r228 r240  
    9393    { 
    9494        $form = $this->addDomainForm(); 
    95         $this->setData('addDomainForm', $form->toHtml()); 
    96         $this->setData('LANG_Main_Menu', _('Main Menu')); 
    97         $this->setData('LANG_List_Domains', _('List Domains')); 
    98         $this->tplFile = 'addDomain.tpl'; 
     95        $this->_renderForm($form); 
    9996        return; 
    10097    } 
     
    112109        $form = $this->addDomainForm(); 
    113110        if (!$form->validate()) { 
    114             $this->addDomain(); 
     111            $this->_renderForm($form); 
    115112            return; 
    116113        } 
     
    209206     * @return void 
    210207     */ 
    211     function cancelDelDomain() { 
     208    public function cancelDelDomain() { 
    212209        $this->setData('message', _("Domain deletion canceled")); 
    213210        return $this->listDomains(); 
     211    } 
     212 
     213    private function _renderForm($form) 
     214    { 
     215        $this->tplFile = 'addDomain.tpl'; 
     216        $this->setData('addDomainForm', $form->toHtml()); 
     217        $this->setData('LANG_Main_Menu', _('Main Menu')); 
     218        $this->setData('LANG_List_Domains', _('List Domains')); 
    214219    } 
    215220