Skip to content
Snippets Groups Projects
Commit b8d43db5 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

small fixes only

parent a6f9110a
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ function showError($sMessage){
}
/**
* Check if user is logged in in shibboleth
* Check if user is logged in in Shibboleth.
* It shows an error, ib shibboleth is not available.
* It detects if a user is logged in.
*/
......@@ -179,8 +179,13 @@ async function checkSession() {
}
}
// ----------------------------------------------------------------------
// INIT
// ----------------------------------------------------------------------
/**
* Init step 1: load language file and make it available in aLang
*/
async function init(){
fetch('lang/' + sLang + '.json')
.then(response => response.json())
......@@ -192,15 +197,18 @@ async function init(){
}
/**
* Init step 2: Check Shibboleth session
*/
async function initStep2(langArray) {
aLang = langArray;
checkSession();
}
// ----------------------------------------------------------------------
// INIT
// ----------------------------------------------------------------------
// MAIN
init();
// ----------------------------------------------------------------------
......@@ -16,6 +16,14 @@
require 'inc_functions.php';
$aAbout = [
'title' => 'AAI Login',
'author' => 'Axel Hahn, Institute for Medical Education, University of Bern',
'source' => 'https://git-repo.iml.unibe.ch/iml-open-source/login-aai',
'license' => 'GNU GPL 3.0',
'version' => '0.3',
];
?><!DOCTYPE html>
<html lang="" dir="">
......@@ -41,17 +49,17 @@
<?php
// --- set language for js script
echo '<input type="hdden" id="lang" value="'.($aConfig['lang'] ?? 'en').'">';
echo '<input type="hidden" id="lang" value="'.($aConfig['lang'] ?? 'en').'">';
// --- messages
echo $SELFURL ? '' : showMessage('error', 'SELFURL is not set. $_SERVER[\'SERVER_NAME\'] is not available.');
echo $aConfig['text-info'] ? showMessage('info', $aConfig['text-info']) : '';
// --- id "errorbox" is used for javascript
// --- id "errorbox" is used for javascript error messages
echo '<div id="errorbox" class="msg error hidden"></div>';
// --- text block if the user is logged in already
echo '<div id="shib-check-logged-in" class="hidden_">
echo '<div id="shib-check-logged-in" class="hidden">
<h2>'.$L->t('logged-in-already-title').'</h2>
<p>
'.$L->t('logged-in-already-text').'<br>
......@@ -77,7 +85,11 @@
</div>
<script type="text/javascript" defer src="functions.js"></script>
<footer><strong><?php echo $aConfig['title'] ?? 'AAI Login'; ?></strong><br>AAI Login v0.2 - <a href="https://git-repo.iml.unibe.ch/iml-open-source/login-aai">Source</a></a></footer>
<footer>
<strong><?php echo $aConfig['title'] ?? 'AAI Login'; ?></strong><br>
<?php echo $aAbout['title'].' v' .$aAbout['version']; ?> -
<a href="<?php echo $aAbout['source']; ?>">Source</a>
</footer>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment