Skip to content
Snippets Groups Projects
Verified Commit 13b8dbf1 authored by Dominik Frantisek Bucik's avatar Dominik Frantisek Bucik
Browse files

refactor: :bulb: Remove old LS Hostel

Remove unused old instance of LS Hostel

BREAKING CHANGE: :firecracker: Removed LS Hostel old
parent 0cddadcf
No related branches found
No related tags found
1 merge request!10refactor: 💡remove old hostel, rename references to LS Username Login
{
"error_report_email_message": {
"en": "Please provide your mail so that we can contact you for further information or let you know the issue was fixed."
},
"user_pass_header": {
"en": "Life Science Hostel Login"
},
"user_pass_text": {
"en": "Enter your email and password"
},
"register_acc_hostel": {
"en": "Sign up"
},
"email": {
"en": "Email"
},
"forgot_password": {
"en": "Forgotten password"
},
"title_WRONGUSERPASS": {
"en": "Incorrect email or password"
},
"descr_WRONGUSERPASS": {
"en": "Either no user with this email could be found, or the password you gave was wrong. Please check the email and try again."
}
}
<?php
/**
* Template form for giving consent.
*
* Parameters:
* - 'srcMetadata': Metadata/configuration for the source.
* - 'dstMetadata': Metadata/configuration for the destination.
* - 'yesTarget': Target URL for the yes-button. This URL will receive a POST request.
* - 'yesData': Parameters which should be included in the yes-request.
* - 'noTarget': Target URL for the no-button. This URL will receive a GET request.
* - 'noData': Parameters which should be included in the no-request.
* - 'attributes': The attributes which are about to be released.
* - 'sppp': URL to the privacy policy of the destination, or FALSE.
*/
declare(strict_types=1);
use SimpleSAML\Module\lsaai\TemplateHelper;
assert('is_array($this->data["srcMetadata"])');
assert('is_array($this->data["dstMetadata"])');
assert('is_string($this->data["yesTarget"])');
assert('is_array($this->data["yesData"])');
assert('is_string($this->data["noTarget"])');
assert('is_array($this->data["noData"])');
assert('is_array($this->data["attributes"])');
assert('is_array($this->data["hiddenAttributes"])');
assert('$this->data["sppp"] === false || is_string($this->data["sppp"])');
// Parse parameters
if (array_key_exists('name', $this->data['srcMetadata'])) {
$srcName = $this->data['srcMetadata']['name'];
} elseif (array_key_exists('OrganizationDisplayName', $this->data['srcMetadata'])) {
$srcName = $this->data['srcMetadata']['OrganizationDisplayName'];
} else {
$srcName = $this->data['srcMetadata']['entityid'];
}
if (is_array($srcName)) {
$srcName = $this->t($srcName);
}
if (array_key_exists('name', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['name'];
} elseif (array_key_exists('OrganizationDisplayName', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['OrganizationDisplayName'];
} else {
$dstName = $this->data['dstMetadata']['entityid'];
}
if (is_array($dstName)) {
$dstName = $this->t($dstName);
}
$srcName = htmlspecialchars($srcName);
$dstName = htmlspecialchars($dstName);
$attributes = $this->data['attributes'];
$this->data['header'] = $this->t('{consent:consent:consent_header}');
$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl(
'consent/style.css'
) . '" />';
$this->data['head'] .= '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl(
'lsaai/res/css/consent.css'
) . '" />';
$this->includeAtTemplateBase('includes/header.php');
?>
<?php
/*
echo $this->t(
'{consent:consent:consent_accept}',
array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName)
);
*/
if (array_key_exists('descr_purpose', $this->data['dstMetadata'])) {
echo '</p><p>' . $this->t(
'{consent:consent:consent_purpose}',
[
'SPNAME' => $dstName,
'SPDESC' => $this->getTranslation(
SimpleSAML\Utils\Arrays::arrayize($this->data['dstMetadata']['descr_purpose'], 'en')
),
]
);
}
?>
<?php
if (false !== $this->data['sppp']) {
echo '<p>' . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . ' ';
echo "<a target='_blank' href='" . htmlspecialchars($this->data['sppp']) . "'>" . $dstName . '</a>';
echo '</p>';
}
echo '<h3 id="attributeheader">' .
$this->t('{consent:consent:consent_attributes_header}', [
'SPNAME' => $dstName,
'IDPNAME' => $srcName,
]) .
'</h3>';
echo TemplateHelper::presentAttributesOld($this, $attributes, '');
?>
<div class="row">
<div class="col-xs-6">
<form action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>">
<?php
if ($this->data['usestorage']) {
$checked = ($this->data['checked'] ? 'checked="checked"' : '');
echo '<div class="checkbox">
<label>
<input type="checkbox" name="saveconsent" value="1" /> ' . $this->t('{perun:consent:remember}') . '
</label>
</div>';
}
?>
<?php
// Embed hidden fields...
foreach ($this->data['yesData'] as $name => $value) {
echo '<input type="hidden" name="' . htmlspecialchars($name) .
'" value="' . htmlspecialchars($value) . '" />';
}
?>
<button type="submit" name="yes" class="btn btn-lg btn-success btn-block" id="yesbutton">
<?php echo htmlspecialchars($this->t('{consent:consent:yes}')); ?>
</button>
</form>
</div>
<div class="col-xs-6">
<form action="<?php echo htmlspecialchars($this->data['noTarget']); ?>">
<?php
foreach ($this->data['noData'] as $name => $value) {
echo '<input type="hidden" name="' . htmlspecialchars($name) .
'" value="' . htmlspecialchars($value) . '" />';
}
?>
<button type="submit" class="btn btn-lg btn-default btn-block btn-no" name="no" id="nobutton">
<?php echo htmlspecialchars($this->t('{consent:consent:no}')); ?>
</button>
</form>
</div>
</div>
<?php
$this->includeAtTemplateBase('includes/footer.php');
<?php
declare(strict_types=1);
if (array_key_exists('name', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['name'];
} elseif (array_key_exists('OrganizationDisplayName', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['OrganizationDisplayName'];
} else {
$dstName = $this->data['dstMetadata']['entityid'];
}
if (is_array($dstName)) {
$dstName = $this->t($dstName);
}
$dstName = htmlspecialchars($dstName);
$this->data['header'] = $this->t('{consent:consent:noconsent_title}');
$this->data['head'] =
'<link rel="stylesheet" media="screen" type="text/css" href="'
. 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />';
$this->data['head'] .= '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl(
'lsaai/res/css/consent.css'
) . '" />';
$this->includeAtTemplateBase('includes/header.php');
echo '<p>' . $this->t('{consent:consent:noconsent_text}', [
'SPNAME' => $dstName,
]) . '</p>';
if ($this->data['resumeFrom']) {
echo '<p><a class="btn btn-default" href="' . htmlspecialchars($this->data['resumeFrom']) . '">';
echo '<i class="glyphicon glyphicon-chevron-left"></i> ';
echo $this->t('{consent:consent:noconsent_return}');
echo '</a></p>';
}
if ($this->data['aboutService']) {
echo '<p><a href="' . htmlspecialchars($this->data['aboutService']) . '">';
echo '<i class="glyphicon glyphicon-info-sign"></i> ';
echo $this->t('{consent:consent:noconsent_goto_about}');
echo '</a></p>';
}
echo '<p><a class="btn btn-default" href="' . htmlspecialchars($this->data['logoutLink']) . '">';
echo '<i class="glyphicon glyphicon-ban-circle"></i> ';
echo $this->t('{consent:consent:abort}', [
'SPNAME' => $dstName,
]);
echo '</a></p>';
$this->includeAtTemplateBase('includes/footer.php');
<?php
declare(strict_types=1);
use SimpleSAML\Configuration;
use SimpleSAML\Module\lsaai\TemplateHelper;
const CONFIG_FILE_NAME = 'module_lsaai.php';
const REGISTER_LINK = 'register_link';
$conf = Configuration::getConfig(TemplateHelper::CONFIG_FILE_NAME);
$register_link = $conf->getString(REGISTER_LINK);
if (strlen($this->data['username']) > 0) {
$this->data['autofocus'] = 'password';
} else {
$this->data['autofocus'] = 'username';
}
/*
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
*/
$this->data['htmlinject'] = [
'htmlContentPre' => [],
'htmlContentPost' => [],
'htmlContentHead' => [],
];
$jquery = [];
if (array_key_exists('jquery', $this->data)) {
$jquery = $this->data['jquery'];
}
if (array_key_exists('pageid', $this->data)) {
$hookinfo = [
'pre' => &$this->data['htmlinject']['htmlContentPre'],
'post' => &$this->data['htmlinject']['htmlContentPost'],
'head' => &$this->data['htmlinject']['htmlContentHead'],
'jquery' => &$jquery,
'page' => $this->data['pageid'],
];
SimpleSAML\Module::callHooks('htmlinject', $hookinfo);
}
header('X-Frame-Options: SAMEORIGIN');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/>
<script type="text/javascript" src="/<?php
echo $this->data['baseurlpath']; ?>resources/script.js"></script>
<title>LS Hostel</title>
<link rel="stylesheet" type="text/css" href="/<?php
echo $this->data['baseurlpath']; ?>resources/default.css"/>
<link rel="icon" type="image/icon" href="/<?php
echo $this->data['baseurlpath']; ?>resources/icons/favicon.ico"/>
<?php
if (!empty($this->data['htmlinject']['htmlContentHead'])) {
foreach ($this->data['htmlinject']['htmlContentHead'] as $c) {
echo $c;
}
}
if ($this->isLanguageRTL()) {
?>
<link rel="stylesheet" type="text/css" href="/<?php
echo $this->data['baseurlpath']; ?>resources/default-rtl.css"/>
<?php
}
?>
<link rel="stylesheet" type="text/css" href="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/bootstrap/css/bootstrap.min.css'); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/css/lsaai.css'); ?>"/>
<meta name="robots" content="noindex, nofollow"/>
<?php
if (array_key_exists('head', $this->data)) {
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
}
?>
</head>
<?php
$onLoad = '';
if (array_key_exists('autofocus', $this->data)) {
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
}
if (isset($this->data['onLoad'])) {
$onLoad .= $this->data['onLoad'];
}
if ('' !== $onLoad) {
$onLoad = ' onload="' . $onLoad . '"';
}
?>
<body<?php
echo $onLoad; ?>>
<div id="wrap">
<div id="content">
<div class="row pl-0 pr-0">
<div class="col-sm-6 logo-wrap col-align--center">
<img src="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/img/ls_logo.png'); ?>" alt="Life Science Hostel logo">
</div>
<div class="col-sm-6">
<h1>
<?php
echo $this->t('{lsaai:lsaai:user_pass_header}');
?>
</h1>
<p><?php
echo $this->t('{lsaai:lsaai:user_pass_text}'); ?></p>
<br>
<?php
if (null !== $this->data['errorcode']) {
?>
<div class="alert alert-danger">
<p>
<span class="glyphicon glyphicon-exclamation-sign"
style="float:left; font-size: 38px; margin-right: 10px;"></span>
<?php
if ('WRONGUSERPASS' === $this->data['errorcode']) {
?>
<strong>
<?php
echo htmlspecialchars(
$this->t(
'{lsaai:lsaai:title_WRONGUSERPASS}',
$this->data['errorparams']
)
); ?>
</strong>
</p>
<p>
<?php
echo htmlspecialchars(
$this->t(
'{lsaai:lsaai:descr_WRONGUSERPASS}',
$this->data['errorparams']
)
); ?>
</p>
<?php
} else {
?>
<strong>
<?php
echo htmlspecialchars(
$this->t(
'{errors:title_' . $this->data['errorcode'] . '}',
$this->data['errorparams']
)
); ?>
</strong>
</p>
<p>
<?php
echo htmlspecialchars(
$this->t(
'{errors:descr_' . $this->data['errorcode'] . '}',
$this->data['errorparams']
)
); ?>
</p>
<?php
} ?>
</div>
<?php
}
?>
<form action="?" method="post" name="f" class="form-horizontal">
<div class="form-group">
<label class="sr-only" for="inlineFormInputGroup"><?php
echo $this->t('{lsaai:lsaai:email}'); ?></label>
<div class="input-group mb-2">
<span class="input-group-addon" id="basic-addon1">@</span>
<input id="username" type="email" name="username" class="form-control" value="<?php
echo htmlspecialchars($this->data['username']); ?>" placeholder="Email"
aria-describedby="basic-addon1"/>
</div>
</div>
<div class="form-group">
<label class="sr-only" for="inlineFormInputGroup"><?php
echo $this->t('{login:password}'); ?></label>
<div class="input-group mb-2">
<span class="input-group-addon">
<span class=" glyphicon glyphicon-lock" id="basic-addon2"></span>
</span>
<input id="password" type="password" name="password" class="form-control"
placeholder="Password" aria-describedby="basic-addon2"/>
</div>
</div>
<div class="form-group">
<button class="btn btn-success btn-block" type="submit">
<?php
echo $this->t('{login:login_button}'); ?>
</button>
</div>
<div class="form-group text-center">
<a class="btn btn-link" href="<?php
echo $register_link; ?>">
<?php
echo $this->t('{lsaai:lsaai:register_acc_hostel}'); ?>
</a>
|
<a class="btn btn-link" href="<?php
echo SimpleSAML\Module::getModuleURL('lsaai/pwd_reset.php'); ?>">
<?php
echo $this->t('{lsaai:lsaai:forgot_password}'); ?>
</a>
</div>
<?php
foreach ($this->data['stateparams'] as $name => $value) {
echo '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars(
$value
) . '" />';
}
?>
</form>
</div>
<?php
if (!empty($this->data['htmlinject']['htmlContentPre'])) {
foreach ($this->data['htmlinject']['htmlContentPre'] as $c) {
echo $c;
}
}
$this->includeAtTemplateBase('includes/footer.php');
<?php
declare(strict_types=1);
$this->data['header'] = '<i class="glyphicon glyphicon-exclamation-sign text-danger"></i> ' . $this->t(
$this->data['dictTitle']
);
$this->data['head'] = <<<'CODE_SAMPLE'
<meta name="robots" content="noindex, nofollow" />
<meta name="googlebot" content="noarchive, nofollow" />
CODE_SAMPLE;
$this->data['head'] .= '<script src="' . SimpleSAML\Module::getModuleUrl('lsaai/res/js/jquery.js') . '" ></script>';
$this->data['head'] .= '<script src="' . SimpleSAML\Module::getModuleUrl(
'lsaai/res/bootstrap/js/bootstrap.min.js'
) . '" ></script>';
$this->includeAtTemplateBase('includes/header.php');
?>
<p>
<?php
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
?>
<a href="#moreInfo" data-toggle="collapse">more <span class="caret"></span></a>
</p>
<?php
// include optional information for error
if (isset($this->data['includeTemplate'])) {
$this->includeAtTemplateBase($this->data['includeTemplate']);
}
?>
<div id="moreInfo" class="collapse">
<p id="trackid" class="input-left">Error number: <?php
echo $this->data['error']['trackId']; ?></p>
<?php
// print out exception only if the exception is available
if ($this->data['showerrors']) {
?>
<p style="margin: 1px"><?php
echo htmlspecialchars($this->data['error']['exceptionMsg']); ?></p>
<pre style="padding: 1em; font-family: monospace;"><?php
echo htmlspecialchars($this->data['error']['exceptionTrace']); ?></pre>
<?php
}
?>
</div>
<?php
/* Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if
* the technical contact email address has been set.
*/
if (isset($this->data['errorReportAddress'])) {
?>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php
echo $this->t('report_header'); ?></h3>
</div>
<div class="panel-body">
<form action="<?php
echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post" class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="reportId">Error ID</label>
<div class="col-sm-10">
<input name="reportId" type="text" class="form-control" id="reportId" value="<?php
echo $this->data['error']['reportId']; ?>" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="email"><?php
echo $this->t('report_email'); ?></label>
<div class="col-sm-10">
<input name="email" type="email" class="form-control" id="email" placeholder="Email" required>
<span class="help-block"><?php
echo $this->t('{lsaai:lsaai:error_report_email_message}'); ?></span>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<textarea name="text" class="form-control" rows="3" placeholder="<?php
echo $this->t('report_explain'); ?>"></textarea>
</div>
</div>
<button type="submit" name="send" class="btn btn-primary"><?php
echo $this->t('report_submit'); ?></button>
</form>
</div>
</div>
<?php
}
?>
<?php
$this->includeAtTemplateBase('includes/footer.php');
<?php
declare(strict_types=1);
$this->data['header'] = $this->t('errorreport_header');
$this->includeAtTemplateBase('includes/header.php');
?>
<p><?php echo $this->t('errorreport_text'); ?></p>
<?php $this->includeAtTemplateBase('includes/footer.php');
<?php
declare(strict_types=1);
if (!empty($this->data['htmlinject']['htmlContentPost'])) {
foreach ($this->data['htmlinject']['htmlContentPost'] as $c) {
echo $c;
}
}
?>
</div>
</div>
</div>
<div id="footer">
<div style="margin: 0px auto; max-width: 1000px;">
<div class="row">
<div id="eu" class="col-md-6">
<p>This project has received funding from the European Union’s Horizon 2020 research and innovation
programme under grant agreement No 654248.</p>
</div>
<div class="col-md-6">
<p><a href="mailto:support@aai.lifescience-ri.eu">CONTACT</a></p>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
/**
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
*/
declare(strict_types=1);
$this->data['htmlinject'] = [
'htmlContentPre' => [],
'htmlContentPost' => [],
'htmlContentHead' => [],
];
$jquery = [];
if (array_key_exists('jquery', $this->data)) {
$jquery = $this->data['jquery'];
}
if (array_key_exists('pageid', $this->data)) {
$hookinfo = [
'pre' => &$this->data['htmlinject']['htmlContentPre'],
'post' => &$this->data['htmlinject']['htmlContentPost'],
'head' => &$this->data['htmlinject']['htmlContentHead'],
'jquery' => &$jquery,
'page' => $this->data['pageid'],
];
SimpleSAML\Module::callHooks('htmlinject', $hookinfo);
}
// - o - o - o - o - o - o - o - o - o - o - o - o -
/*
* Do not allow to frame SimpleSAMLphp pages from another location.
* This prevents clickjacking attacks in modern browsers.
*
* If you don't want any framing at all you can even change this to
* 'DENY', or comment it out if you actually want to allow foreign
* sites to put SimpleSAMLphp in a frame. The latter is however
* probably not a good security practice.
*/
header('X-Frame-Options: SAMEORIGIN');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/>
<script type="text/javascript" src="/<?php
echo $this->data['baseurlpath']; ?>resources/script.js"></script>
<title><?php
if (array_key_exists('header', $this->data)) {
echo $this->data['header'];
} else {
echo 'SimpleSAMLphp';
}
?></title>
<link rel="stylesheet" type="text/css" href="/<?php
echo $this->data['baseurlpath']; ?>resources/default.css"/>
<link rel="icon" type="image/icon" href="/<?php
echo $this->data['baseurlpath']; ?>resources/icons/favicon.ico"/>
<?php
if (!empty($jquery)) {
$version = '1.8';
if (array_key_exists('version', $jquery)) {
$version = $jquery['version'];
}
if ('1.8' === $version) {
if (isset($jquery['core']) && $jquery['core']) {
echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] .
'resources/jquery-1.8.js"></script>' . "\n";
}
if (isset($jquery['ui']) && $jquery['ui']) {
echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] .
'resources/jquery-ui-1.8.js"></script>' . "\n";
}
if (isset($jquery['css']) && $jquery['css']) {
echo '<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] .
'resources/uitheme1.8/jquery-ui.css" />' . "\n";
}
}
}
if (isset($this->data['clipboard.js'])) {
echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] .
'resources/clipboard.min.js"></script>' . "\n";
}
if (!empty($this->data['htmlinject']['htmlContentHead'])) {
foreach ($this->data['htmlinject']['htmlContentHead'] as $c) {
echo $c;
}
}
if ($this->isLanguageRTL()) {
?>
<link rel="stylesheet" type="text/css" href="/<?php
echo $this->data['baseurlpath']; ?>resources/default-rtl.css"/>
<?php
}
?>
<link rel="stylesheet" type="text/css" href="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/bootstrap/css/bootstrap.min.css'); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/css/lsaai.css'); ?>"/>
<meta name="robots" content="noindex, nofollow"/>
<?php
if (array_key_exists('head', $this->data)) {
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
}
?>
</head>
<?php
$onLoad = '';
if (array_key_exists('autofocus', $this->data)) {
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
}
if (isset($this->data['onLoad'])) {
$onLoad .= $this->data['onLoad'];
}
if ('' !== $onLoad) {
$onLoad = ' onload="' . $onLoad . '"';
}
?>
<body<?php
echo $onLoad; ?>>
<div id="wrap">
<div id="header">
<img src="<?php
echo SimpleSAML\Module::getModuleUrl('lsaai/res/img/ls_logo.png'); ?>" alt="Life Science Hostel logo">
<h1>
<?php
echo isset($this->data['header']) ? $this->data['header'] : 'Life Science Hostel';
?>
</h1>
</div>
<div id="content">
<?php
if (!empty($this->data['htmlinject']['htmlContentPre'])) {
foreach ($this->data['htmlinject']['htmlContentPre'] as $c) {
echo $c;
}
}
<?php
use SimpleSAML\Module\lsaai\TemplateHelper;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>POST data</title>
</head>
<body onload="document.getElementsByTagName('input')[0].click();">
<noscript>
<p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the button below once to
proceed.</p>
</noscript>
<form method="post" action="<?php
echo htmlspecialchars($this->data['destination']); ?>">
<!-- Need to add this element and call click method, because calling submit()
on the form causes failed submission if the form has another element with name or id of submit.
See: https://developer.mozilla.org/en/DOM/form.submit#Specification -->
<input type="submit" style="display:none;"/>
<?php
if (array_key_exists('post', $this->data)) {
$post = $this->data['post'];
} else {
// For backwards compatibility
assert('array_key_exists("response", $this->data)');
assert('array_key_exists("RelayStateName", $this->data)');
assert('array_key_exists("RelayState", $this->data)');
$post = [
'SAMLResponse' => $this->data['response'],
$this->data['RelayStateName'] => $this->data['RelayState'],
];
}
foreach ($post as $name => $value) {
TemplateHelper::printItem($name, $value);
}
?>
<noscript>
<button type="submit" class="btn">Submit</button>
</noscript>
</form>
</body>
</html>
\ No newline at end of file
<?php
declare(strict_types=1);
/**
* This is simple example of template for perun Discovery service.
*
* Allow type hinting in IDE
*
* @var sspmod_perun_DiscoTemplate $this
*/
use SimpleSAML\Module\lsaai\TemplateHelper;
$this->data['jquery'] = [
'core' => true,
'ui' => true,
'css' => true,
];
$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl(
'discopower/style.css'
) . '" />';
$this->data['head'] .= '<link rel="stylesheet" media="screen" type="text/css" href="' . SimpleSAML\Module::getModuleUrl(
'lsaai/res/css/disco.css'
) . '" />';
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl(
'discopower/js/jquery.livesearch.js'
) . '"></script>';
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl(
'discopower/js/suggest.js'
) . '"></script>';
$this->data['head'] .= TemplateHelper::searchScript();
$this->includeAtTemplateBase('includes/header.php');
$this->includeAtTemplateBase('includes/footer.php');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment