Changeset 603
- Timestamp:
- 10/01/07 17:56:44 (1 year ago)
- Files:
-
- branches/1.0beta3.x/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (2 diffs)
- branches/1.0beta3.x/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (2 diffs)
- trunk/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (2 diffs)
- trunk/lib/jelix/controllers/jControllerDaoCrud.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0beta3.x/lib/jelix/controllers/jControllerDaoCrud.class.php
r597 r603 167 167 $tpl->assign('controls',$form->getControls()); 168 168 $tpl->assign('editAction' , $this->_getAction('preupdate')); 169 $tpl->assign('createAction' , $this->_getAction(' create'));169 $tpl->assign('createAction' , $this->_getAction('precreate')); 170 170 $tpl->assign('deleteAction' , $this->_getAction('delete')); 171 171 $tpl->assign('viewAction' , $this->_getAction('view')); … … 190 190 protected function _index($resp, $tpl) { 191 191 192 } 193 194 /** 195 * prepare a form to create a record. 196 */ 197 function precreate() { 198 // we cannot create the form directly in the create action 199 // because if the forms already exists, we wouldn't show 200 // errors or already filled field. see ticket #292 201 $form = jForms::create($this->form); 202 $rep = $this->getResponse('redirect'); 203 $rep->action = $this->_getAction('create'); 204 return $rep; 192 205 } 193 206 branches/1.0beta3.x/lib/jelix/controllers/jControllerDaoCrud.class.php
r597 r603 167 167 $tpl->assign('controls',$form->getControls()); 168 168 $tpl->assign('editAction' , $this->_getAction('preupdate')); 169 $tpl->assign('createAction' , $this->_getAction(' create'));169 $tpl->assign('createAction' , $this->_getAction('precreate')); 170 170 $tpl->assign('deleteAction' , $this->_getAction('delete')); 171 171 $tpl->assign('viewAction' , $this->_getAction('view')); … … 190 190 protected function _index($resp, $tpl) { 191 191 192 } 193 194 /** 195 * prepare a form to create a record. 196 */ 197 function precreate() { 198 // we cannot create the form directly in the create action 199 // because if the forms already exists, we wouldn't show 200 // errors or already filled field. see ticket #292 201 $form = jForms::create($this->form); 202 $rep = $this->getResponse('redirect'); 203 $rep->action = $this->_getAction('create'); 204 return $rep; 192 205 } 193 206 trunk/lib/jelix/controllers/jControllerDaoCrud.class.php
r597 r603 167 167 $tpl->assign('controls',$form->getControls()); 168 168 $tpl->assign('editAction' , $this->_getAction('preupdate')); 169 $tpl->assign('createAction' , $this->_getAction(' create'));169 $tpl->assign('createAction' , $this->_getAction('precreate')); 170 170 $tpl->assign('deleteAction' , $this->_getAction('delete')); 171 171 $tpl->assign('viewAction' , $this->_getAction('view')); … … 190 190 protected function _index($resp, $tpl) { 191 191 192 } 193 194 /** 195 * prepare a form to create a record. 196 */ 197 function precreate() { 198 // we cannot create the form directly in the create action 199 // because if the forms already exists, we wouldn't show 200 // errors or already filled field. see ticket #292 201 $form = jForms::create($this->form); 202 $rep = $this->getResponse('redirect'); 203 $rep->action = $this->_getAction('create'); 204 return $rep; 192 205 } 193 206 trunk/lib/jelix/controllers/jControllerDaoCrud.class.php
r597 r603 167 167 $tpl->assign('controls',$form->getControls()); 168 168 $tpl->assign('editAction' , $this->_getAction('preupdate')); 169 $tpl->assign('createAction' , $this->_getAction(' create'));169 $tpl->assign('createAction' , $this->_getAction('precreate')); 170 170 $tpl->assign('deleteAction' , $this->_getAction('delete')); 171 171 $tpl->assign('viewAction' , $this->_getAction('view')); … … 190 190 protected function _index($resp, $tpl) { 191 191 192 } 193 194 /** 195 * prepare a form to create a record. 196 */ 197 function precreate() { 198 // we cannot create the form directly in the create action 199 // because if the forms already exists, we wouldn't show 200 // errors or already filled field. see ticket #292 201 $form = jForms::create($this->form); 202 $rep = $this->getResponse('redirect'); 203 $rep->action = $this->_getAction('create'); 204 return $rep; 192 205 } 193 206
