$this->getDialogContainerId(), 'html' => $html, 'title' => 'Background Screening', 'tpl' => 'ViewController/modal-agree-popup.tpl', ]; $this->getDoc()->addItem($item, 'AFTER_BODY'); } private function getDialogContainerId() { return $this->dialogContainerId; } private function isAgreedWithTerms() { if ('y' != Qs_Request::getPostValue($this->hiddenInputName)) { $this->addError('You should agree with Background Screening terms'); return false; } return true; } protected function _addDialogResources() { $this->getDoc()->addScript('js/app/termsDialog/Dialog.js'); $this->getDoc()->addScript('js/app/termsDialog/Form.js'); $this->getDoc()->addScript('js/fancybox/jquery.fancybox.js'); $this->getDoc()->addStylesheet('css/thirdpart/fancybox/jquery.fancybox.css'); $dialogId = $this->dialogContainerId; $this->getDoc()->addInitObject('app.termsDialog.Form', [[ 'id' => $this->getId(), 'dialog' => [ 'id' => $dialogId, 'hiddenInputName' => $this->hiddenInputName, 'nodes' => [ 'form' => '#' . $this->getId(), 'agreeButton' => '#' . $dialogId . ' [data-agree]', 'dialogBody' => '#' . $dialogId . ' .modal-body', ], ], ]]); $this->renderTermDialog(); return $this; } }