/** * Generate the middle section of the home page */ protected function getMainSection() { $nickName = empty($_COOKIE['n']) ? '' : $_COOKIE['n']; $form = Forms::getLoginForm($nickName); $js = Forms::getLoginFormJs(); $this->addInlineJs($js); return <<<HTML <div class="container theme-showcase" role="main"> <div class="jumbotron"> \t<h3>Sign In</h3> {$form} </div> </div> HTML; }
/** * Generate the HTML for the login modal window */ private function getLoginModal() { $nickName = htmlentities($_COOKIE['n']); $loginForm = Forms::getLoginForm($nickName); $html = <<<HTML <div id="loginModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Sign In to this Test Community</h4> \t\t<h4 id="modalMsg"></h4> </div> <div class="modal-body"> {$loginForm} </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> HTML; $this->addModalWindow($html); }