X-Git-Url: https://git-public.kairo.at/?a=blobdiff_plain;ds=sidebyside;f=app%2Findex.php;h=b9820504ffbf9aea27c3645e9fd445a2d5c23a28;hb=9b32cdebaf8f89db6c365d8c4b108c5fe682006b;hp=90be17fe99ce2579a08d6c96e049cab82fb85075;hpb=9cab985cf8d73f719cd7efc2838ce2e107b45b21;p=authserver.git diff --git a/app/index.php b/app/index.php index 90be17f..b982050 100644 --- a/app/index.php +++ b/app/index.php @@ -6,28 +6,11 @@ // Include the common auth system files (including the OAuth2 Server object). require_once(__DIR__.'/authsystem.inc.php'); -// Start HTML document as a DOM object. -extract(ExtendedDocument::initHTML5()); // sets $document, $html, $head, $title, $body -$document->formatOutput = true; // we want a nice output - -$style = $head->appendElement('link'); -$style->setAttribute('rel', 'stylesheet'); -$style->setAttribute('href', 'authsystem.css'); -$head->appendJSFile('authsystem.js'); -$title->appendText('KaiRo.at Authentication Server'); -$h1 = $body->appendElement('h1', 'KaiRo.at Authentication Server'); - -// Make the document not be scaled on mobile devices. -$vpmeta = $head->appendElement('meta'); -$vpmeta->setAttribute('name', 'viewport'); -$vpmeta->setAttribute('content', 'width=device-width, height=device-height'); - $errors = $utils->checkForSecureConnection(); $utils->sendSecurityHeaders(); -$para = $body->appendElement('p', _('This login system does not work without JavaScript. Please activate JavaScript for this site to log in.')); -$para->setAttribute('id', 'jswarning'); -$para->setAttribute('class', 'warn'); +// Initialize the HTML document with our basic elements. +extract($utils->initHTMLDocument('KaiRo.at Authentication Server')); // sets $document, $html, $head, $title, $body if (!count($errors)) { $session = $utils->initSession(); // Read session or create new session and set cookie. @@ -512,7 +495,8 @@ if (count($errors)) { $list = $body->appendElement('ul'); $list->setAttribute('class', 'flat warn'); foreach ($errors as $msg) { - $item = $list->appendElement('li', $msg); + $item = $list->appendElement('li'); + $item->appendHTMLMarkup($msg); } $body->appendButton(_('Back'), 'history.back();'); }