/** edit an existing object **/ | |
public function executeEditWidget(dmWebRequest $request) | |
{ | |
$this->form = $this->forms['AmapFrontForm'] = new AmapFrontForm(Doctrine::getTable('Amap')->find($request->getParameter('id'))); | |
if($request->isMethod('post') and $this->form->bindAndValid($request)) | |
{ | |
$this->form->save(); | |
$this->redirect('/mes-amaps'); | |
} | |
} | |
/** create a new object **/ | |
public function executeFormWidget(dmWebRequest $request) | |
{ | |
$form = $this->forms['AmapFront'] = new AmapFrontForm(Doctrine::getTable('Amap')->find($request->getParameter('id'))); | |
if ($request->isMethod('post') && $form->bindAndValid($request)) { | |
if($amap = $form->save()) { | |
dm::enableMailer(); | |
$this->getMailer()->composeAndSend('...') | |
); | |
} | |
$this->redirect('/inscription-amap-merci'); | |
} | |
} |
// sureremnt ameliorable | |
public function executeEdit() | |
{ | |
$this->form = $this->forms['AmapFrontForm']; | |
} | |
public function executeForm() | |
{ | |
$this->form = $this->forms['AmapFront']; | |
} |
Amapy: | |
Amap: | |
page: true | |
components: | |
show: | |
form: | |
edit: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment