Agree * @copyright Tamaranga */ class Agree extends FormBlock { public function init() { parent::init(); $this->setTemplate('form/blocks/agree', 'listings'); $this->setTitle(_t('item-form', 'Agreement')); $this->setKey('agree'); } public function data() { if ($this->form->edit()) { return false; } if (User::id()) { return false; } if (! $this->config('listings.form.agreement', true, TYPE_BOOL)) { return false; } if (! $this->config('users.register.agreement', true, TYPE_BOOL)) { return false; } $data = parent::data(); return $data; } }