1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-05-24 11:58:11 +03:00

Subscription iframe

This commit is contained in:
Alexander Yakovlev 2014-02-04 11:35:26 +07:00
parent 25f8f37ff1
commit e709da8696

View file

@ -96,13 +96,10 @@ class Controller_Subscription extends Controller_Layout {
);
$this->template->controls = $controls;
$this->template->errors = array();
$model = ORM::factory('Client');
if ($this->request->method() === HTTP_Request::POST) {
$model = ORM::factory('Client')->where('email', '=', $this->request->post('email'))->find();
if (!$model->loaded())
{
$model = ORM::factory('Client');
}
$model->values($this->request->post(), array_keys($controls));
$model->customize();
$validation = $model->validate_create($this->request->post());