| @@ 493-502 (lines=10) @@ | ||
| 490 | $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form'); |
|
| 491 | $form->setAttribute('method', 'post'); |
|
| 492 | ||
| 493 | if ($this->getRequest()->isPost()) { |
|
| 494 | $data = $this->getRequest()->getPost()->toArray(); |
|
| 495 | $form->setData($data); |
|
| 496 | if ($form->isValid()) { |
|
| 497 | $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry); |
|
| 498 | if ($result) { |
|
| 499 | $statusMail = true; |
|
| 500 | } |
|
| 501 | } |
|
| 502 | } |
|
| 503 | ||
| 504 | // buildView must be before sendMail because it adds the game template path to the templateStack |
|
| 505 | $viewModel = $this->buildView($this->game); |
|
| @@ 686-695 (lines=10) @@ | ||
| 683 | $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form'); |
|
| 684 | $form->setAttribute('method', 'post'); |
|
| 685 | ||
| 686 | if ($this->getRequest()->isPost()) { |
|
| 687 | $data = $this->getRequest()->getPost()->toArray(); |
|
| 688 | $form->setData($data); |
|
| 689 | if ($form->isValid()) { |
|
| 690 | $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry); |
|
| 691 | if ($result) { |
|
| 692 | $statusMail = true; |
|
| 693 | } |
|
| 694 | } |
|
| 695 | } |
|
| 696 | ||
| 697 | $viewModel = $this->buildView($this->game); |
|
| 698 | ||