Skip to content

Commit

Permalink
trabajando en los emails de respuesta
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloRN committed Aug 3, 2011
1 parent 496aff9 commit 97c8e06
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
24 changes: 24 additions & 0 deletions apps/admin/modules/respuestaBusqueda/actions/actions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,28 @@
*/
class respuestaBusquedaActions extends autoRespuestaBusquedaActions
{
public function executeFormWidget(dmWebRequest $request)
{
$form = new respuestaBusquedaForm();
if ($request->isMethod('post') && $form->bindAndValid($request))
{
$form->save();
$user = $this->getUser()->getDmUser();
$this->getService('mail')->setTemplate('respuesta_busqueda')
->addValues(array(
'busqueda_id' => $form->getValue('busqueda_id'),
'email' => $user->getEmail(),
'mensaje' => $form->getValue('mensaje'),
'username' => $user->getUsername(),
'nombre' => $user->getNombre(),
'apellidos' => $user->getApellidos(),
'create_at' => $form->getValue('create_at')

))

->send();
$this->redirectBack();
}
$this->forms['respuestaBusqueda'] = $form;
}
}
Loading

0 comments on commit 97c8e06

Please sign in to comment.