Changeset 241
- Timestamp:
- 01/08/08 01:38:11 (1 year ago)
- Files:
-
- trunk/Framework/Module/Main/IPMaps.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Framework/Module/Main/IPMaps.php
r233 r241 110 110 public function add() 111 111 { 112 $ this->setData('addForm', $this->_addForm()->toHtml());113 $this-> tplFile = 'addIPMap.tpl';112 $form = $this->_addForm(); 113 $this->_renderForm($form); 114 114 } 115 115 … … 126 126 $form = $this->_addForm(); 127 127 if (!$form->validate()) { 128 return $this->add(); 128 $this->_renderForm($form); 129 return; 129 130 } 130 131 try { … … 132 133 } catch (Net_Vpopmaild_Exception $e) { 133 134 $this->setData('message', _('Error adding IP Map')); 134 return $this->add(); 135 $this->_renderForm($form); 136 return; 135 137 } 136 138 $this->tplFile = 'addIPMapSuccess.tpl'; … … 162 164 return $form; 163 165 } 166 167 private function _renderForm($form) 168 { 169 $this->setData('addForm', $form->toHtml()); 170 $this->tplFile = 'addIPMap.tpl'; 171 } 164 172 } 165 173 ?>
