Unverified Commit e94ccd00 authored by Nick Evangelou's avatar Nick Evangelou Committed by GitHub
Browse files

Merge pull request #16 from EGI-Federation/release-egi-2.0

Merge release-egi-2.0 to master
No related merge requests found
Showing with 961 additions and 659 deletions
+961 -659
......@@ -5,8 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v-egi-2.0.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.4.1...v-egi-2.0.0) - 2021-05-10
### Fixed
- Added missing space in button text
- Fix undefined index error for `idps_in_searchable_list_index`
- Load JavaScript scripts with the new way
- Load jQuery CSS script
- Fix `translationParams` error in userid template
### Changed
- Renamed login_at variable to login_with and moved in the discopower dictionary
- Rename disco-tpl.php->disco.tpl.php
- Change discopower js files path
- Update translation functionality for SSP v1.17
- Update language array
- Update templates of concent modules to support SSP v1.17
- Update "no_state" template to support SSP v1.17
- Update "disco" template to support SSP v1.17
- Move `ribbon_text` definition to config file
- Comply to [PSR-4: Autoloader](https://www.php-fig.org/psr/psr-4/) guidelines
- Comply to [PSR-1: Basic Coding Standard](https://www.php-fig.org/psr/psr-1/) guidelines
- Comply to [PSR-12: Extended Coding Style](https://www.php-fig.org/psr/psr-12/)
guidelines
- Apply modern array syntax to comply with [SimpleSAMLphp v1.17](https://simplesamlphp.org/docs/stable/simplesamlphp-upgrade-notes-1.17)
<!-- markdownlint-disable line-length -->
## [v-egi-1.4.1](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.4.0...v-egi-1.4.1) - 2021-01-20
<!-- markdownlint-enable line-length -->
### Added
- Added comanage loader spinner
......@@ -21,23 +52,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made loader spinner configurable
- Moved language bar into a shared, stand alone element
<!-- markdownlint-disable line-length -->
## [v-egi-1.4.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.3.2...v-egi-1.4.0) - 2021-01-15
<!-- markdownlint-enable line-length -->
### Added
- EGI wrapper template for simple html views
<!-- markdownlint-disable line-length -->
## [v-egi-1.3.2](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.3.1...v-egi-1.3.2) - 2020-12-22
<!-- markdownlint-enable line-length -->
### Changed
- `browser_tab_title` from EGI to Check-in in `default.definition.json`
- `%IDP%` to `%IDPNAME%` in `userid_error.definition.json`::`friendly_description`
- `%IDP%` to `%IDPNAME%` in `userid_error.definition.json`::`friendly_description`
- Removed `<a href=\"%RETRY_URL%\">` from `userid_error.definition.json`::`resolution_description`
- Removed redundant code from `conseform.php`
<!-- markdownlint-disable line-length -->
## [v-egi-1.3.1](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.3.0...v-egi-1.3.1) - 2020-12-21
<!-- markdownlint-enable line-length -->
### Added
- Exception template for attrauthcomanage module
......@@ -46,22 +89,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Custom EGI footer date
<!-- markdownlint-disable line-length -->
## [v-egi-1.3.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.2.1...v-egi-1.3.0) - 2020-12-15
<!-- markdownlint-enable line-length -->
### Added
- Static View with information for Email Confirmation
- Add style rules and logos for the IdPs:
- IDPOpen
<!-- markdownlint-disable line-length -->
## [v-egi-1.2.1](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.2.0...v-egi-1.2.1) - 2019-09-13
<!-- markdownlint-enable line-length -->
### Fixed
- Fix bug in IdPs buttons style caused by unclosed html element.
<!-- markdownlint-disable line-length -->
## [v-egi-1.2.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.1.0...v-egi-1.2.0) - 2019-09-02
<!-- markdownlint-enable line-length -->
### Changed
- Alter Google login button style due to Google+ deprecation.
......@@ -76,8 +131,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bitbucket
- Github
<!-- markdownlint-disable line-length -->
## [v-egi-1.1.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v-egi-1.0.0...v-egi-1.1.0) - 2018-10-30
<!-- markdownlint-enable line-length -->
### Added
- Add banner and an extra view for cookies options
......@@ -94,16 +153,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update footer style
- Render header logo link url customisable
<!-- markdownlint-disable line-length -->
## [v-egi-1.0.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/compare/v2.0.0...v-egi-1.0.0) - 2018-05-07
<!-- markdownlint-enable line-length -->
### Changed
- Replace themevanilla -> themeegi
- Use EGI identity (logos, translations)
- Use custom EGI footer
<!-- markdownlint-disable line-length -->
## [v2.0.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/commits/v2.0.0) - 2018-04-17
<!-- markdownlint-enable line-length -->
### Added
Create a new theme for SimpleSAMLphp. The theme is a fork from [simplesamlphp-module-themevanilla](https://github.com/rciam/simplesamlphp-module-themevanilla).
<h1 align="center">EGI theme for SimpleSAMLphp</h1>
# EGI theme for SimpleSAMLphp
![discopower](/screenshots/disco_buttons_bottom.png)
![discopower](screenshots/disco_buttons_bottom.png)
A theme for the SimpleSAMLphp software that is used for the EGI Check-in
service. The theme is based on the [RCIAM vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla).
Screenshots are available in [screenshots](screenshots/).
More information regarding the installation and the customisation of the theme can be found
in the [repository of the vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla).
More information regarding the installation and the customisation of the theme
can be found in the [repository of the vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla).
## Acknowledgement
This work has received funding from the [EGI Foundation (EGI.eu)](https://www.egi.eu/about/egi-foundation/) and the [EOSC-hub project](http://eosc-hub.eu/) (Horizon 2020) under Grant number 777536.
This work has received funding from the [EGI Foundation (EGI.eu)](https://www.egi.eu/about/egi-foundation/)
and the [EOSC-hub project](http://eosc-hub.eu/) (Horizon 2020) under Grant
number 777536.
<!-- markdownlint-disable no-inline-html line-length -->
<img src="https://europa.eu/european-union/sites/europaeu/files/docs/body/flag_yellow_high.jpg" height="24">
<!-- markdownlint-enable no-inline-html line-length -->
## License
Licensed under the Apache 2.0 license, for details see `LICENSE`.
<?php
/**
* This is example configuration of SimpleSAMLphp themevanila.
* Copy this file to default config directory and edit the properties.
......@@ -6,22 +7,83 @@
* copy command (from SimpleSAML base dir)
* cp modules/themeegi/module_themeegi.php config/
*/
$config = array(
'cookiePolicy' => array(
array('type' => 'Session State', 'provider' => 'aai.egi.eu', 'name' => 'egi_proxy_authtoken, egi_google_proxy_authtoken, egi_google_proxy_authtoken, egi_facebook_proxy_authtoken, egi_linkedin_proxy_authtoken, egi_orcid_proxy_authtoken', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user authentication token to prevent session fixation attacks'),
array('type' => 'Session State', 'provider' => 'aai.egi.eu', 'name' => 'egi_proxy_sid, egi_google_proxy_sid, egi_google_proxy_sid, egi_facebook_proxy_sid, egi_linkedin_proxy_sid, egi_orcid_proxy_sid', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user session ID to retrieve session information'),
array('type' => 'Preferences', 'provider' => 'aai.egi.eu', 'name' => 'egi_poweridpdisco_lastidp', 'thirdParty' => false, 'category' => 'Persistent', 'purpose' => 'Preserve preferred IdP selection for SimpleSAMLphp IdP discovery service'),
array('type' => 'Preferences', 'provider' => 'aai.egi.eu', 'name' => 'egi_poweridpdisco_remember', 'thirdParty' => false, 'category' => 'Persistent', 'purpose' => 'Preserve preference whether to remember IdP selection for SimpleSAMLphp IdP discovery service'),
array('type' => 'Session State', 'provider' => 'aai.egi.eu', 'name' => 'egi_co_registry_sid', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user session ID to retrieve session information'),
array('type' => 'Preferences', 'provider' => 'aai.egi.eu', 'name' => 'egi_co_registry_tz', 'thirdParty' => false, 'category' => 'Persistent', 'purpose' => 'Preserve preferred timezone selection for COmanage EGI Account Registry'),
array('type' => 'Preferences', 'provider' => 'aai.egi.eu', 'name' => 'i18next', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve preferred language for EGI AAI OpenID Connect Provider'),
array('type' => 'Session State', 'provider' => 'aai.egi.eu', 'name' => 'JSESSIONID', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user session ID to retrieve session information')
),
'views' => array(
'aup' => 'https://aai.egi.eu/aup/check-in.html', // Terms and Conditions URL. The key MUST BE `aup`
'privacy' => 'https://aai.egi.eu/privacy.html', // Privace URL. The key MUST BE `privacy`
),
'loader' => 'loader', // Loading Spinner to use. Two options are available. `loader` or `cmg_loader`
);
?>
\ No newline at end of file
$config = [
'cookiePolicy' => [
[
'type' => 'Session State',
'provider' => 'aai.egi.eu',
'name' => 'egi_proxy_authtoken, egi_google_proxy_authtoken, egi_google_proxy_authtoken,'
. ' egi_facebook_proxy_authtoken, egi_linkedin_proxy_authtoken, egi_orcid_proxy_authtoken',
'thirdParty' => false,
'category' => 'Session',
'purpose' => 'Preserve user authentication token to prevent session fixation attacks'
],
[
'type' => 'Session State',
'provider' => 'aai.egi.eu',
'name' => 'egi_proxy_sid, egi_google_proxy_sid, egi_google_proxy_sid, egi_facebook_proxy_sid,'
, ' egi_linkedin_proxy_sid, egi_orcid_proxy_sid',
'thirdParty' => false,
'category' => 'Session',
'purpose' => 'Preserve user session ID to retrieve session information'
],
[
'type' => 'Preferences',
'provider' => 'aai.egi.eu',
'name' => 'egi_poweridpdisco_lastidp',
'thirdParty' => false,
'category' => 'Persistent',
'purpose' => 'Preserve preferred IdP selection for SimpleSAMLphp IdP discovery service'
],
[
'type' => 'Preferences',
'provider' => 'aai.egi.eu',
'name' => 'egi_poweridpdisco_remember',
'thirdParty' => false,
'category' => 'Persistent',
'purpose' => 'Preserve preference whether to remember IdP selection for SimpleSAMLphp IdP discovery service'
],
[
'type' => 'Session State',
'provider' => 'aai.egi.eu',
'name' => 'egi_co_registry_sid',
'thirdParty' => false,
'category' => 'Session',
'purpose' => 'Preserve user session ID to retrieve session information'
],
[
'type' => 'Preferences',
'provider' => 'aai.egi.eu',
'name' => 'egi_co_registry_tz',
'thirdParty' => false,
'category' => 'Persistent',
'purpose' => 'Preserve preferred timezone selection for COmanage EGI Account Registry'
],
[
'type' => 'Preferences',
'provider' => 'aai.egi.eu',
'name' => 'i18next',
'thirdParty' => false,
'category' => 'Session',
'purpose' => 'Preserve preferred language for EGI AAI OpenID Connect Provider'
],
[
'type' => 'Session State',
'provider' => 'aai.egi.eu',
'name' => 'JSESSIONID',
'thirdParty' => false,
'category' => 'Session',
'purpose' => 'Preserve user session ID to retrieve session information'
],
],
'views' => [
// Terms and Conditions URL. The key MUST BE `aup`
'aup' => 'https://aai.egi.eu/aup/check-in.html',
// Privace URL. The key MUST BE `privacy`
'privacy' => 'https://aai.egi.eu/privacy.html',
],
// Loading Spinner to use. Two options are available `loader` or `cmg_loader`
'loader' => 'loader',
'ribbon_text' => '',
];
......@@ -49,7 +49,8 @@
},
"login_help_option3_text": {
"en": "Contact our <a href='mailto:checkin-support@mailman.egi.eu'>support</a>"
},
"login_with": {
"en": "Log in with"
}
}
......@@ -5,14 +5,14 @@ $this->includeAtTemplateBase('includes/header.php');
<div class="body-container" id="content">
<div class="message-container">
<span class="head-title">
<img class="email-gif" src="resources/icons/email.gif">
<h2><span class="title-msg"><?php echo $this->t('{themeegi:default:message_title}'); ?></span></h2>
</span>
<div class="message"><?php echo $this->t('{themeegi:default:message_bd}'); ?></div>
<div class="subtitle"><?php echo $this->t('{themeegi:default:message_sub}'); ?></div>
<span class="head-title">
<img class="email-gif" src="resources/icons/email.gif">
<h2><span class="title-msg"><?= $this->t('{themeegi:default:message_title}') ?></span></h2>
</span>
<div class="message"><?= $this->t('{themeegi:default:message_bd}') ?></div>
<div class="subtitle"><?= $this->t('{themeegi:default:message_sub}') ?></div>
</div>
</div>
<?php
$this->includeAtTemplateBase('includes/footer.php'); ?>
$this->includeAtTemplateBase('includes/footer.php');
<?php
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php');
$themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$cookies = $themeConfig->getValue('cookiePolicy');
$this->data['header'] = (strpos($this->t('{themeegi:policy:page_title}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:page_title}') : '');
$this->data['header'] = (
strpos($this->t('{themeegi:policy:page_title}'), 'not translated') === false
? $this->t('{themeegi:policy:page_title}')
: ''
);
$this->includeAtTemplateBase('includes/header.php');
?>
<h2><?php echo($this->data['header']); ?></h2>
<h2><?= $this->data['header'] ?></h2>
<div>
<ol>
<li><?php echo(strpos($this->t('{themeegi:policy:purpose_head}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:purpose_head}') : ''); ?></li>
</ol>
<?php echo(strpos($this->t('{themeegi:policy:purpose_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:purpose_body}') : ''); ?>
<ol start="2">
<li><?php echo(strpos($this->t('{themeegi:policy:cookie_list_head}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:cookie_list_head}') : ''); ?></li>
</ol>
<?php echo(strpos($this->t('{themeegi:policy:cookie_list_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:cookie_list_body}') : ''); ?>
<table class="table">
<thead>
<tr>
<th><?php echo(strpos($this->t('{themeegi:policy:table_type}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_type}') : ''); ?></th>
<th><?php echo(strpos($this->t('{themeegi:policy:table_provider}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_provider}') : ''); ?></th>
<th><?php echo(strpos($this->t('{themeegi:policy:table_name}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_name}') : ''); ?></th>
<th><?php echo(strpos($this->t('{themeegi:policy:table_third_party}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_third_party}') : ''); ?></th>
<th><?php echo(strpos($this->t('{themeegi:policy:table_category}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_category}') : ''); ?></th>
<th><?php echo(strpos($this->t('{themeegi:policy:table_purpose}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:table_purpose}') : ''); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach($cookies as $row) {
<ol>
<li>
<?=
strpos($this->t('{themeegi:policy:purpose_head}'), 'not translated') === false
? $this->t('{themeegi:policy:purpose_head}')
: ''
?>
</li>
</ol>
<?=
strpos($this->t('{themeegi:policy:purpose_body}'), 'not translated') === false
? $this->t('{themeegi:policy:purpose_body}')
: ''
?>
<tr>
<td><?php echo(isset($row['type']) ? $row['type'] : '');?></td>
<td><u><?php echo(isset($row['provider']) ? $row['provider'] : '');?></u></td>
<td><?php echo(isset($row['name']) ? $row['name'] : '');?></td>
<td><?php echo(isset($row['thirdParty']) && $row['thirdParty'] ? 'Yes' : 'No' );?></td>
<td><?php echo(isset($row['category']) ? $row['category'] : '');?></td>
<td><?php echo(isset($row['purpose']) ? $row['purpose'] : '');?></td>
</tr>
<?php
}
<ol start="2">
<li>
<?=
strpos($this->t('{themeegi:policy:cookie_list_head}'), 'not translated') === false
? $this->t('{themeegi:policy:cookie_list_head}')
: ''
?>
</li>
</ol>
<?=
strpos($this->t('{themeegi:policy:cookie_list_body}'), 'not translated') === false
? $this->t('{themeegi:policy:cookie_list_body}')
: ''
?>
<table class="table">
<thead>
<tr>
<th>
<?=
strpos($this->t('{themeegi:policy:table_type}'), 'not translated') === false
? $this->t('{themeegi:policy:table_type}')
: ''
?>
</th>
<th>
<?=
strpos($this->t('{themeegi:policy:table_provider}'), 'not translated') === false
? $this->t('{themeegi:policy:table_provider}')
: ''
?>
</th>
<th>
<?=
strpos($this->t('{themeegi:policy:table_name}'), 'not translated') === false
? $this->t('{themeegi:policy:table_name}')
: ''
?>
</th>
<th>
<?=
strpos($this->t('{themeegi:policy:table_third_party}'), 'not translated') === false
? $this->t('{themeegi:policy:table_third_party}')
: ''
?>
</th>
<th>
<?=
strpos($this->t('{themeegi:policy:table_category}'), 'not translated') === false
? $this->t('{themeegi:policy:table_category}')
: ''
?>
</th>
<th>
<?=
strpos($this->t('{themeegi:policy:table_purpose}'), 'not translated') === false
? $this->t('{themeegi:policy:table_purpose}')
: ''
?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($cookies as $row) : ?>
<tr>
<td><?= isset($row['type']) ? $row['type'] : '' ?></td>
<td><u><?= isset($row['provider']) ? $row['provider'] : '' ?></u></td>
<td><?= isset($row['name']) ? $row['name'] : '' ?></td>
<td><?= isset($row['thirdParty']) && $row['thirdParty'] ? 'Yes' : 'No' ?></td>
<td><?= isset($row['category']) ? $row['category'] : '' ?></td>
<td><?= isset($row['purpose']) ? $row['purpose'] : '' ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<ol start="3">
<li>
<?=
strpos($this->t('{themeegi:policy:endurance_head}'), 'not translated') === false
? $this->t('{themeegi:policy:endurance_head}')
: ''
?>
</li>
</ol>
<?=
strpos($this->t('{themeegi:policy:endurance_body}'), 'not translated') === false
? $this->t('{themeegi:policy:endurance_body}')
: ''
?>
<ol start="4">
<li>
<?=
strpos($this->t('{themeegi:policy:disable_cookie_head}'), 'not translated') === false
? $this->t('{themeegi:policy:disable_cookie_head}')
: ''
?>
</li>
</ol>
<?=
strpos($this->t('{themeegi:policy:disable_cookie_body}'), 'not translated') === false
? $this->t('{themeegi:policy:disable_cookie_body}')
: ''
?>
<?=
strpos($this->t('{themeegi:policy:note}'), 'not translated') === false
? $this->t('{themeegi:policy:note}')
: ''
?>
</tbody>
</table>
<ol start="3">
<li><?php echo(strpos($this->t('{themeegi:policy:endurance_head}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:endurance_head}') : ''); ?></li>
</ol>
<?php echo(strpos($this->t('{themeegi:policy:endurance_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:endurance_body}') : ''); ?>
<ol start="4">
<li><?php echo(strpos($this->t('{themeegi:policy:disable_cookie_head}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:disable_cookie_head}') : ''); ?></li>
</ol>
<?php echo(strpos($this->t('{themeegi:policy:disable_cookie_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:disable_cookie_body}') : ''); ?>
<?php echo(strpos($this->t('{themeegi:policy:note}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:note}') : ''); ?>
</div>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
<?php
$this->includeAtTemplateBase('includes/footer.php');
<?php
// Get Configuration
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php');
$themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$views = $themeConfig->getValue('views');
// Content
$body = $this->t('{themeegi:default:no_content}');
// Get request parameter and load Content
if(!empty($_REQUEST['id']) && !empty($views)) {
$ld_view = $views[$_REQUEST['id']];
$contextOptions = array(
'ssl' => array(
if (!empty($_REQUEST['id']) && !empty($views)) {
$ldView = $views[$_REQUEST['id']];
$contextOptions = [
'ssl' => [
'verify_peer' => false,
),
'http' => array(
],
'http' => [
'timeout' => 2, // 2 Seconds
),
);
],
];
$sslContext = stream_context_create($contextOptions);
$loaded_content = file_get_contents($ld_view, NULL, $sslContext);
if(!empty($loaded_content)) {
$body = $loaded_content;
$loadedContent = file_get_contents($ldView, null, $sslContext);
if (!empty($loadedContent)) {
$body = $loadedContent;
}
}
// Load Head and Dependencies
$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE);
$this->data['jquery'] = ['core' => true, 'ui' => true, 'css' => true];
// Load Header
$this->includeAtTemplateBase('includes/header.php');
// Load Body
print $body;
echo $body;
// Load Footer
$this->includeAtTemplateBase('includes/footer.php');
?>
\ No newline at end of file
......@@ -3,13 +3,15 @@ $this->data['header'] = $this->t('{themeegi:attrauthcomanage:exception_header}')
$this->includeAtTemplateBase('includes/header.php');
?>
<h1><?php echo $this->t('{themeegi:attrauthcomanage:exception_title}');?></h1>
<h1><?= $this->t('{themeegi:attrauthcomanage:exception_title}') ?></h1>
<?php echo $this->t('{themeegi:attrauthcomanage:exception_description}');?>
<?= $this->t('{themeegi:attrauthcomanage:exception_description}') ?>
<pre>
<?php
$tag = preg_replace('/attrauthcomanage:/','themeegi:', $this->data['e'], 1);
echo (!empty($this->getTag('{'.$tag.'}')) ? $this->t('{'.$tag.'}', $this->data['parameters']) : $this->data['e']);
$tag = preg_replace('/attrauthcomanage:/', 'themeegi:', $this->data['e'], 1);
echo !empty($this->getTag('{' . $tag . '}'))
? $this->t('{' . $tag . '}', $this->data['parameters'])
: $this->data['e'];
?>
</pre>
......
......@@ -5,37 +5,37 @@ $this->includeAtTemplateBase('includes/header.php');
?>
<?php
if ($this->data['errorcode'] !== NULL) {
?>
<div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
<img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" />
<h2><?php echo $this->t('{login:error_header}'); ?></h2>
<p><b><?php echo $this->t('{errors:title_' . $this->data['errorcode'] . '}'); ?></b></p>
<p><?php echo $this->t('{errors:descr_' . $this->data['errorcode'] . '}'); ?></p>
</div>
<?php
}
?>
<h2 style="break: both"><?php echo $this->t('{authX509:X509error:certificate_header}'); ?></h2>
<p><?php echo $this->t('{authX509:X509error:certificate_text}'); ?></p>
<a href="<?php echo htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()); ?>">
<?php echo $this->t('{login:login_button}'); ?>
</a>
<?php if ($this->data['errorcode'] !== null) : ?>
<div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
<img
src="/<?= $this->data['baseurlpath'] ?>resources/icons/experience/gtk-dialog-error.48x48.png"
class="float-l"
style="margin: 15px"
alt=""
/>
<h2><?= $this->t('{login:error_header}') ?></h2>
<p><b><?= $this->t('{errors:title_' . $this->data['errorcode'] . '}') ?></b></p>
<p><?= $this->t('{errors:descr_' . $this->data['errorcode'] . '}') ?></p>
</div>
<?php endif; ?>
<h2 style="break: both"><?= $this->t('{authX509:X509error:certificate_header}') ?></h2>
<p><?= $this->t('{authX509:X509error:certificate_text}') ?></p>
<a href="<?= htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()) ?>">
<?= $this->t('{login:login_button}') ?>
</a>
<?php
if(!empty($this->data['links'])) {
echo '<ul class="links list-unstyled" style="margin-top: 2em">';
foreach($this->data['links'] AS $l) {
echo '<li><a href="' . htmlspecialchars($l['href']) . '">' . htmlspecialchars($this->t($l['text'])) . '</a></li>';
}
echo '</ul>';
if (!empty($this->data['links'])) {
echo '<ul class="links list-unstyled" style="margin-top: 2em">';
foreach ($this->data['links'] as $l) {
echo '<li><a href="' . htmlspecialchars($l['href']) . '">'
. htmlspecialchars($this->t($l['text']))
. '</a></li>';
}
echo '</ul>';
}
$this->includeAtTemplateBase('includes/footer.php');
<?php
/**
* Template which is shown when there is only a short interval since the user was last authenticated.
*
......@@ -9,20 +10,16 @@
* @package SimpleSAMLphp
*/
$this->data['403_header'] = $this->t('{authorize:Authorize:403_header}');
$this->data['403_text'] = $this->t('{authorize:Authorize:403_text}');
$this->includeAtTemplateBase('includes/header.php');
?>
<h2><?php echo $this->data['403_header']; ?></h2>
<p><?php echo $this->data['403_text']; ?></p>
<?php
if (isset($this->data['LogoutURL'])) {
?>
<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p>
<?php
}
?>
<h2><?= $this->data['403_header'] ?></h2>
<p><?= $this->data['403_text'] ?></p>
<?php if (isset($this->data['LogoutURL'])) : ?>
<p><a href="<?= htmlspecialchars($this->data['LogoutURL']) ?>"><?= $this->t('{status:logout}') ?></a></p>
<?php endif; ?>
<?php
$this->includeAtTemplateBase('includes/footer.php');
<?php
// Get Configuration and set the loader
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php');
$themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$loader = $themeConfig->getValue('loader');
if(!empty($loader)) {
if (!empty($loader)) {
$this->includeAtTemplateBase('includes/' . $loader . '.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.
* - 'sppp': URL to the privacy policy of the destination, or false.
*
* @package SimpleSAMLphp
*/
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"])');
assert(is_string($this->data['yesTarget']));
assert(is_string($this->data['noTarget']));
assert($this->data['sppp'] === false || is_string($this->data['sppp']));
// Needed for present_attributes_ssp()
$globalConfig = \SimpleSAML\Configuration::getInstance();
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'consent:consentform.php');
// 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'];
}
$dstName = $this->data['dstName'];
$srcName = $this->data['srcName'];
if (is_array($srcName)) {
$srcName = $this->t($srcName);
}
$id = $_REQUEST['StateId'];
$state = \SimpleSAML\Auth\State::loadState($id, 'consent:request');
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'];
if (array_key_exists('consent:hiddenAttributes', $state)) {
$t->data['hiddenAttributes'] = $state['consent:hiddenAttributes'];
} else {
$dstName = $this->data['dstMetadata']['entityid'];
}
if (is_array($dstName)) {
$dstName = $this->t($dstName);
$t->data['hiddenAttributes'] = [];
}
$srcName = htmlspecialchars($srcName);
$dstName = htmlspecialchars($dstName);
$attributes = $this->data['attributes'];
$this->data['header'] = $this->t('{consent:consent:consent_header}');
$this->data['jquery'] = array('core' => TRUE);
$this->data['jquery'] = ['core' => true];
$this->includeAtTemplateBase('includes/header.php');
?>
<?php
/**
* Recursive attribute array listing function
*
* @param SimpleSAML_XHTML_Template $t Template object
* @param array $attributes Attributes to be presented
* @param string $nameParent Name of parent element
*
* @return string HTML representation of the attributes
*/
function present_attributes($t, $attributes, $nameParent)
{
$alternate = array('ssp-table--tr__odd', 'ssp-table--tr__even');
$i = 0;
$summary = 'summary="' . $t->t('{consent:consent:table_summary}') . '"';
if (strlen($nameParent) > 0) {
$parentStr = strtolower($nameParent) . '_';
$str = '<div class="ssp-attrs--container"><table class="table" ' . $summary . '>';
} else {
$parentStr = '';
$str = '<div class="ssp-attrs--container js-spread"><table id="table_with_attributes" class="table" '. $summary .'>';
}
foreach ($attributes as $name => $value) {
$nameraw = $name;
$name = $t->getAttributeTranslation($parentStr . $nameraw);
if (preg_match('/^child_/', $nameraw)) {
// insert child table
$parentName = preg_replace('/^child_/', '', $nameraw);
foreach ($value as $child) {
$str .= "\n" . '<tr class="odd ssp--table--tr__odd"><td>' .
present_attributes($t, $child, $parentName) . '</td></tr>';
<h2 class="text-center"><?= $this->data['consent_accept'] ?></h2>
<div class="row js-spread">
<div class="col-sm-12 ssp-content-group js-spread">
<?php
echo $this->data['attributes_html'] = present_attributes_ssp($t, $attributes, '');
/**
* Recursive attribute array listing function
*
* @param \SimpleSAML\XHTML\Template $t Template object
* @param array $attributes Attributes to be presented
* @param string $nameParent Name of parent element
*
* @return string HTML representation of the attributes
*/
function present_attributes_ssp($t, $attributes, $nameParent)
{
$translator = $t->getTranslator();
$alternate = ['ssp-table--tr__odd', 'ssp-table--tr__even'];
$i = 0;
$summary = 'summary="' . $translator->t('{consent:consent:table_summary}') . '"';
if (strlen($nameParent) > 0) {
$parentStr = strtolower($nameParent) . '_';
$str = '<div class="ssp-attrs--container"><table class="table" ' . $summary . '>';
} else {
$parentStr = '';
$str = '<div class="ssp-attrs--container js-spread"><table id="table_with_attributes" class="table" '
. $summary . '>';
}
} else {
// insert values directly
$str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] .
'"><td><div class="attrname ssp-table--attrname">' . htmlspecialchars($name) . '</div>';
foreach ($attributes as $name => $value) {
$nameRaw = $name;
$name = $translator->getAttributeTranslation($parentStr . $nameRaw);
$isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true);
if ($isHidden) {
$hiddenId = SimpleSAML\Utils\Random::generateID();
if (preg_match('/^child_/', $nameRaw)) {
// insert child table
$parentName = preg_replace('/^child_/', '', $nameRaw);
foreach ($value as $child) {
$str .= "\n" . '<tr class="odd ssp--table--tr__odd"><td>' .
present_attributes_ssp($t, $child, $parentName) . '</td></tr>';
}
} else {
// insert values directly
$str .= '<div class="attrvalue ssp-table--attrvalue" style="display: none;" id="hidden_' . $hiddenId . '">';
} else {
$str .= '<div class="attrvalue ssp-table--attrvalue">';
}
$str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] .
'"><td><div class="attrname ssp-table--attrname">' . htmlspecialchars($name) . '</div>';
if (sizeof($value) > 1) {
// we hawe several values
$str .= '<ul class="list-unstyled ssp-table--attrvalue--list">';
foreach ($value as $listitem) {
if ($nameraw === 'jpegPhoto') {
$str .= '<li class="ssp-table--attrvalue--list--item"><img src="data:image/jpeg;base64,' .
htmlspecialchars($listitem) .
'" alt="User photo" /></li>';
$isHidden = in_array($nameRaw, $t->data['hiddenAttributes'], true);
if ($isHidden) {
$hiddenId = \SimpleSAML\Utils\Random::generateID();
$str .= '<div class="attrvalue ssp-table--attrvalue" style="display: none;" id="hidden_'
. $hiddenId . '">';
} else {
$str .= '<li class="ssp-table--attrvalue--list--item">' . htmlspecialchars($listitem) . '</li>';
$str .= '<div class="attrvalue ssp-table--attrvalue">';
}
}
$str .= '</ul>';
} elseif (isset($value[0])) {
// we hawe only one value
if ($nameraw === 'jpegPhoto') {
$str .= '<img src="data:image/jpeg;base64,' .
htmlspecialchars($value[0]) .
'" alt="User photo" />';
} else {
$str .= htmlspecialchars($value[0]);
}
} // end of if multivalue
$str .= '</div>';
if ($isHidden) {
$str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">';
$str .= '<a class="consent_showattributelink ssp-btn__show-more" href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId;
$str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');"'
.' data-toggle="tooltip" data-placement="right" title="'. $t->t('{consent:consent:show_attribute}') .'">';
$str .= '<span class="glyphicon glyphicon-eye-open ssp-show-more" aria-hidden="true"></span>';
$str .= '</a>';
$str .= '</div>';
}
$str .= '</td></tr>';
} // end else: not child table
} // end foreach
$str .= isset($attributes)? '</table></div>':'';
return $str;
}
echo '<h2 class="text-center">' .
$this->t(
'{consent:consent:consent_accept}',
array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName)).
'</h2>
<div class="row js-spread">
<div class="col-sm-12 ssp-content-group js-spread">';
?>
if (sizeof($value) > 1) {
// we have several values
$str .= '<ul class="list-unstyled ssp-table--attrvalue--list">';
foreach ($value as $listItem) {
if ($nameRaw === 'jpegPhoto') {
$str .= '<li class="ssp-table--attrvalue--list--item">'
. '<img src="data:image/jpeg;base64,'
. htmlspecialchars($listItem) . '" alt="User photo" /></li>';
} else {
$str .= '<li class="ssp-table--attrvalue--list--item">'
. htmlspecialchars($listItem) . '</li>';
}
}
$str .= '</ul>';
} elseif (isset($value[0])) {
// we have only one value
if ($nameRaw === 'jpegPhoto') {
$str .= '<img src="data:image/jpeg;base64,' .
htmlspecialchars($value[0]) . '" alt="User photo" />';
} else {
$str .= htmlspecialchars($value[0]);
}
} // end of if multivalue
$str .= '</div>';
if ($isHidden) {
$str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">';
$str .= '<a class="consent_showattributelink ssp-btn__show-more"'
. ' href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId;
$str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');"'
. ' data-toggle="tooltip" data-placement="right" title="'
. $t->t('{consent:consent:show_attribute}') . '">';
$str .= '<span class="glyphicon glyphicon-eye-open ssp-show-more" aria-hidden="true"></span>';
$str .= '</a>';
$str .= '</div>';
}
<?php
echo present_attributes($this, $attributes, '');
?>
<div class="ssp-btns-container">
<form style="display: inline-block"
action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>">
<p class"ssp-btns-container--checkbox>
$str .= '</td></tr>';
} // end else: not child table
} // end foreach
$str .= isset($attributes) ? '</table></div>' : '';
return $str;
}
?>
<?php
if (isset($this->data['consent_purpose'])) {
echo '<p>' . $this->data['consent_purpose'] . '</p>';
}
?>
<div class="ssp-btns-container">
<form
id="consent_yes"
action="<?= htmlspecialchars($this->data['yesTarget']) ?>"
style="display:inline-block;"
>
<p class="ssp-btns-container--checkbox">
<?php
if ($this->data['usestorage']) {
$checked = ($this->data['checked'] ? 'checked="checked"' : '');
echo '<input type="checkbox" name="saveconsent" ' . $checked .
' value="1" /> ' . $this->t('{consent:consent:remember}');
} // Embed hidden fields...
?>
<input type="hidden" name="StateId" value="<?= htmlspecialchars($this->data['stateId']) ?>" />
</p>
<button
type="submit"
name="yes"
class="ssp-btn btn ssp-btn__action ssp-btns-container--btn__left text-uppercase"
id="yesbutton"
>
<?= htmlspecialchars($this->t('{consent:consent:yes}')) ?>
</button>
</form>
<form
id="consent_no"
action="<?= htmlspecialchars($this->data['noTarget']) ?>"
style="display:inline-block;"
>
<input type="hidden" name="StateId" value="<?= htmlspecialchars($this->data['stateId']) ?>" />
<button
type="submit"
class="ssp-btn ssp-btn__secondary btn ssp-btns-container--btn__right text-uppercase"
name="no"
id="nobutton"
>
<?= htmlspecialchars($this->t('{consent:consent:no}')) ?>
</button>
</form>
</div> <!-- /ssp-btns-container -->
</div> <!-- /ssp-content-group -->
</div> <!-- /row -->
<?php
if ($this->data['usestorage']) {
$checked = ($this->data['checked'] ? 'checked="checked"' : '');
echo '<input type="checkbox" name="saveconsent" ' . $checked .
' value="1" /> ' . $this->t('{consent:consent:remember}');
if ($this->data['sppp'] !== false) {
echo "<p>" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " ";
echo '<a target="_blank" href="' . htmlspecialchars($this->data['sppp']) . '">' . $dstName . "</a>";
echo "</p>";
}
// Embed hidden fields...
foreach ($this->data['yesData'] as $name => $value) {
echo '<input type="hidden" name="' . htmlspecialchars($name) .
'" value="' . htmlspecialchars($value) . '" />';
}
?>
</p>
<button type="submit" name="yes" class=" ssp-btn btn ssp-btn__action ssp-btns-container--btn__left text-uppercase" id="yesbutton">
<?php echo htmlspecialchars($this->t('{consent:consent:yes}')) ?>
</button>
</form>
<form style="display: inline-block;" action="<?php echo htmlspecialchars($this->data['noTarget']); ?>"
method="get">
<?php
foreach ($this->data['noData'] as $name => $value) {
echo('<input type="hidden" name="' . htmlspecialchars($name) .
'" value="' . htmlspecialchars($value) . '" />');
}
?>
<button type="submit" class="ssp-btn ssp-btn__secondary btn ssp-btns-container--btn__right text-uppercase" name="no" id="nobutton">
<?php echo htmlspecialchars($this->t('{consent:consent:no}')) ?>
</button>
</form>
</div> <!-- /ssp-btns-container -->
</div> <!-- /ssp-content-group -->
</div> <!-- /row -->
<?php
$this->includeAtTemplateBase('includes/footer.php');
?>
<?php
$this->data['header'] = $this->t('{logout:title}');
$this->data['jquery'] = ['core' => true];
$this->includeAtTemplateBase('includes/header.php');
echo('<h2>' . $this->data['header'] . '</h2>');
echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>');
echo ('<h2>' . $this->data['header'] . '</h2>');
echo ('<p>' . $this->t('{logout:logged_out_text}') . '</p>');
$this->includeAtTemplateBase('includes/footer.php');
<?php
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['header'] = $this->t('{consent:consent:noconsent_title}');
$this->data['jquery'] = ['core' => true];
$this->includeAtTemplateBase('includes/header.php');
echo '<h3>' . $this->data['header'] . '</h3>';
echo '<p>' . $this->t('{consent:consent:noconsent_text}', array('SPNAME' => $dstName)) . '</p>';
echo '<p>' . $this->data['noconsent_text'] . '</p>';
echo '<div class="ssp-btns-container">';
if ($this->data['resumeFrom']) {
echo('<a href="' . htmlspecialchars($this->data['resumeFrom']) . '" class="ssp-btn btn ssp-btn__action ssp-btns-container--btn__left text-uppercase">');
echo($this->t('{consent:consent:noconsent_return}'));
echo('</a>');
echo (
'<a href="' . htmlspecialchars($this->data['resumeFrom'])
. '" class="ssp-btn btn ssp-btn__action ssp-btns-container--btn__left text-uppercase">'
. $this->t('{consent:consent:noconsent_return}')
. '</a>'
);
}
if ($this->data['aboutService']) {
echo('<a href="' . htmlspecialchars($this->data['aboutService']) . '" class="ssp-btn btn text-uppercase">');
echo($this->t('{consent:consent:noconsent_goto_about}'));
echo('</a>');
echo ('<a href="' . htmlspecialchars($this->data['aboutService']) . '" class="ssp-btn btn text-uppercase">');
echo ($this->t('{consent:consent:noconsent_goto_about}'));
echo ('</a>');
}
echo('<a href="' . htmlspecialchars($this->data['logoutLink']) . '" class="ssp-btn btn ssp-btn__warning text-uppercase ssp-btns-container--btn__right">' . $this->t('{consent:consent:abort}', array('SPNAME' => $dstName)) . '</a>');
echo (
'<a href="' . htmlspecialchars($this->data['logoutLink'])
. '" class="ssp-btn btn ssp-btn__warning text-uppercase ssp-btns-container--btn__right">'
. $this->data['noconsent_abort'] . '</a>'
);
echo '</div>'; //ssp-btns-container
$this->includeAtTemplateBase('includes/footer.php');
......@@ -9,14 +9,15 @@ $retry = htmlspecialchars($this->t('{core:no_cookie:retry}'));
$this->data['header'] = $header;
$this->includeAtTemplateBase('includes/header.php');
?>
echo('<h2>' . $header . '</h2>');
echo('<p>' . $description . '</p>');
<h2><?= $header ?></h2>
<p><?= $description ?></p>
if ($retryURL !== NULL) {
echo('<ul class="list-unstyled">');
echo('<li><a href="' . htmlspecialchars($retryURL) . '" id="retry">' . $retry . '</a></li>');
echo('</ul>');
}
<?php if ($retryURL !== null) : ?>
<ul class="list-unstyled">
<li><a href="<?= htmlspecialchars($retryURL) ?>" id="retry"><?= $retry ?></a></li>
</ul>
<?php endif;
$this->includeAtTemplateBase('includes/footer.php');
<?php
echo('<p>' . $this->t('{core:no_metadata:config_problem}') . '</p>');
echo('<ul class="list-unstyled">');
echo('<li>' . $this->t('{core:no_metadata:suggestion_user_link}') . '</li>');
echo('<li>' . $this->t('{core:no_metadata:suggestion_developer}') . '</li>');
echo('</ul>');
<p><?= $this->t('{core:no_metadata:config_problem}') ?></p>
<ul class="list-unstyled">
<li><?= $this->t('{core:no_metadata:suggestion_user_link}') ?></li>
<li><?= $this->t('{core:no_metadata:suggestion_developer}') ?></li>
</ul>
<?php
echo('<h2>' . $this->t('{core:no_state:suggestions}') . '</h2>');
echo('<ul class="list-unstyled">');
echo('<li>' . $this->t('{core:no_state:suggestion_goback}') . '</li>');
echo('<li>' . $this->t('{core:no_state:suggestion_closebrowser}') . '</li>');
echo('</ul>');
echo('<h3>' . $this->t('{core:no_state:causes}') . '</h3>');
echo('<ul class="list-unstyled">');
echo('<li>' . $this->t('{core:no_state:cause_backforward}') . '</li>');
echo('<li>' . $this->t('{core:no_state:cause_openbrowser}') . '</li>');
echo('<li>' . $this->t('{core:no_state:cause_nocookie}') . '</li>');
echo('</ul>');
<h2><?= $this->t('{core:no_state:suggestions}') ?></h2>
<ul class="list-nstyled">
<li><?= $this->t('{core:no_state:suggestion_badlink}') ?></li>
<li><?= $this->t('{core:no_state:suggestion_goback}') ?></li>
<li><?= $this->t('{core:no_state:suggestion_closebrowser}') ?></li>
</ul>
<h3><?= $this->t('{core:no_state:causes}') ?></h3>
<ul class="list-nstyled">
<li><?= $this->t('{core:no_state:cause_badlink}') ?></li>
<li><?= $this->t('{core:no_state:cause_backforward}') ?></li>
<li><?= $this->t('{core:no_state:cause_openbrowser}') ?></li>
<li><?= $this->t('{core:no_state:cause_nocookie}') ?></li>
</ul>
<?php
$this->data['header'] = $this->t($this->data['dictTitle']);
$this->data['jquery'] = array('core' => TRUE);
$this->data['jquery'] = ['core' => true];
$this->data['head'] = <<<EOF
<meta name="robots" content="noindex, nofollow" />
......@@ -9,7 +9,7 @@ EOF;
$this->includeAtTemplateBase('includes/header.php');
?>
<h2><?php echo $this->t($this->data['dictTitle']); ?></h2>
<h2><?= $this->t($this->data['dictTitle']) ?></h2>
<?php
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
......@@ -18,61 +18,61 @@ if (isset($this->data['includeTemplate'])) {
$this->includeAtTemplateBase($this->data['includeTemplate']);
}
?>
<div class="trackidtext">
<p><?php echo $this->t('report_trackid'); ?></p>
<div class="input-group">
<input class="form-control" type="text" readonly id="trackid" value="<?php echo $this->data['error']['trackId']; ?>">
<span class="input-group-btn" aria-hidden="true">
<div class="trackidtext">
<p><?= $this->t('report_trackid') ?></p>
<div class="input-group">
<input class="form-control" type="text" readonly id="trackid" value="<?= $this->data['error']['trackId'] ?>">
<span class="input-group-btn" aria-hidden="true">
<button data-clipboard-target="#trackid" id="btntrackid" class="btn btn-default ssp-btn--copy">
<img src="/<?php echo $this->data['baseurlpath'].'resources/icons/clipboard.svg'; ?>"
alt="Copy to clipboard" />
<img
src="/<?= $this->data['baseurlpath'] . 'resources/icons/clipboard.svg' ?>"
alt="Copy to clipboard"
/>
</button>
</span>
</span>
</div>
</div>
</div>
<?php
// print out exception only if the exception is available
if ($this->data['showerrors']) {
?>
<h2><?php echo $this->t('debuginfo_header'); ?></h2>
<p><?php echo $this->t('debuginfo_text'); ?></p>
if ($this->data['showerrors']) : ?>
<h2><?= $this->t('debuginfo_header') ?></h2>
<p><?= $this->t('debuginfo_text') ?></p>
<div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
<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>
<p style="margin: 1px"><?= htmlspecialchars($this->data['error']['exceptionMsg']) ?></p>
<pre style="padding: 1em; font-family: monospace;">
<?= htmlspecialchars($this->data['error']['exceptionTrace']) ?>
</pre>
</div>
<?php
}
<?php endif;
/* 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'])) {
?>
<h2><?php echo $this->t('report_header'); ?></h2>
<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
<p><?php echo $this->t('report_text'); ?></p>
<p><?php echo $this->t('report_email'); ?>
<input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
if (isset($this->data['errorReportAddress'])) : ?>
<h2><?= $this->t('report_header') ?></h2>
<form action="<?= htmlspecialchars($this->data['errorReportAddress']) ?>" method="post">
<p><?= $this->t('report_text') ?></p>
<p><?= $this->t('report_email') ?>
<input type="text" size="25" name="email" value="<?= htmlspecialchars($this->data['email']) ?>" />
</p>
<p>
<textarea class="metadatabox" name="text" rows="6" cols="50" style="width: 100%; padding: 0.5em;"><?php
echo $this->t('report_explain'); ?></textarea>
<textarea class="metadatabox" name="text" rows="6" cols="50" style="width: 100%; padding: 0.5em;">
<?= $this->t('report_explain') ?>
</textarea>
</p>
<p>
<input type="hidden" name="reportId" value="<?php echo $this->data['error']['reportId']; ?>"/>
<button type="submit" name="send" class="btn"><?php echo $this->t('report_submit'); ?></button>
<input type="hidden" name="reportId" value="<?= $this->data['error']['reportId'] ?>"/>
<button type="submit" name="send" class="btn"><?= $this->t('report_submit') ?></button>
</p>
</form>
<?php
}
?>
<h2 style="clear: both"><?php echo $this->t('howto_header'); ?></h2>
<p><?php echo $this->t('howto_text'); ?></p>
<script type="text/javascript">
var clipboard = new Clipboard('#btntrackid');
</script>
<?php endif; ?>
<h2 style="clear: both"><?= $this->t('howto_header') ?></h2>
<p><?= $this->t('howto_text') ?></p>
<script type="text/javascript">
var clipboard = new Clipboard('#btntrackid');
</script>
<?php
$this->includeAtTemplateBase('includes/footer.php');
<?php
if(!empty($this->data['htmlinject']['htmlContentPost'])) {
foreach($this->data['htmlinject']['htmlContentPost'] as $c) {
print $c;
}
if (!empty($this->data['htmlinject']['htmlContentPost'])) {
foreach ($this->data['htmlinject']['htmlContentPost'] as $c) {
echo $c;
}
}
?>
</div><!-- /container -->
</div><!-- /ssp-container -->
<?php if(strpos($this->t('{themeegi:discopower:cookies_text}'), 'not translated') === false || strpos($this->t('{themeegi:discopower:cookies_accept_btn_text}'), 'not translated') === false): ?>
<!-- cookies popup -->
<div id="cookies">
<div id="cookies-wrapper">
<p>
<?php print $this->t('{themeegi:discopower:cookies_text}'); ?>
<?php if(strpos($this->t('{themeegi:discopower:cookies_link_text}'), 'not translated') === false): ?>
<a href="<?php print $this->t('{themeegi:discopower:cookies_link_url}'); ?>" target="_blank"><?php print $this->t('{themeegi:discopower:cookies_link_text}'); ?></a>
<?php endif; ?>
</p>
<a id="js-accept-cookies" class="cookies-ok" href="#">
<?php print $this->t('{themeegi:discopower:cookies_accept_btn_text}'); ?>
</a>
<?php
if (
strpos($this->t('{themeegi:discopower:cookies_text}'), 'not translated') === false
|| strpos($this->t('{themeegi:discopower:cookies_accept_btn_text}'), 'not translated') === false
) : ?>
<!-- cookies popup -->
<div id="cookies">
<div id="cookies-wrapper">
<p>
<?= $this->t('{themeegi:discopower:cookies_text}') ?>
<?php
if (strpos($this->t('{themeegi:discopower:cookies_link_text}'), 'not translated') === false) : ?>
<a
href="<?= $this->t('{themeegi:discopower:cookies_link_url}') ?>"
target="_blank"
>
<?= $this->t('{themeegi:discopower:cookies_link_text}') ?>
</a>
<?php endif; ?>
</p>
<a id="js-accept-cookies" class="cookies-ok" href="#">
<?= $this->t('{themeegi:discopower:cookies_accept_btn_text}') ?>
</a>
</div>
</div>
</div>
<!-- /cookies popup -->
<!-- /cookies popup -->
<?php endif; ?>
<footer class="ssp-footer text-center">
<div class="container-fluid ssp-footer--container container">
<div class="row ssp-content-group--footer">
<!-- Add language bar -->
<?php
$includeLanguageBar = (!empty($_POST)) ? false : true;
$includeLanguageBar = (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === true) ? false : true;
<div class="container-fluid ssp-footer--container container">
<div class="row ssp-content-group--footer">
<!-- Add language bar -->
<?php
$includeLanguageBar = (!empty($_POST)) ? false : true;
$includeLanguageBar = (
(isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === true)
? false
: true
);
if ($includeLanguageBar) {
$this->includeAtTemplateBase('includes/language_bar.php');
}
if ($includeLanguageBar) {
$this->includeAtTemplateBase('includes/language_bar.php');
}
?>
<div class="col-sm-12 col-md-4 ssp-footer__item ssp-footer__item--images text-center">
<a href="https://grnet.gr/">
<img class="ssp-footer__item__logo" src="<?php print SimpleSAML_Module::getModuleURL('themeegi/resources/images/grnet_logo_en.svg'); ?>" alt="GRNET" />
</a>
<img class="ssp-footer__item__logo--eu" src="<?php print SimpleSAML_Module::getModuleURL('themeegi/resources/images/eu.svg'); ?>" alt="European Union" />
</div>
<div class="col-sm-12 col-md-4 ssp-footer__item">
<div class="ssp-footer__item__links">
<a class="ssp-footer__item__links__left_link" href="/proxy/module.php/themeegi/views.php?id=aup">Terms</a><a href="/proxy/module.php/themeegi/views.php?id=privacy">Privacy</a>
?>
<div class="col-sm-12 col-md-4 ssp-footer__item ssp-footer__item--images text-center">
<a href="https://grnet.gr/">
<img
class="ssp-footer__item__logo"
src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/grnet_logo_en.svg') ?>"
alt="GRNET"
/>
</a>
<img
class="ssp-footer__item__logo--eu"
src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/eu.svg') ?>"
alt="European Union"
/>
</div>
<div class="col-sm-12 col-md-4 ssp-footer__item">
<div class="ssp-footer__item__links">
<a class="ssp-footer__item__links__left_link" href="/proxy/module.php/themeegi/views.php?id=aup">
Terms
</a>
<a href="/proxy/module.php/themeegi/views.php?id=privacy">Privacy</a>
</div>
</div>
</div><!-- /row -->
<div class="row">
<div class="col-sm-12 ssp-footer__item ssp-footer__item--ack text-center">
Copyright &copy;<?=
(
(strpos($this->t('{themeegi:discopower:copyright_year_start}'), 'not translated') === false)
? $this->t('{themeegi:discopower:copyright_year_start}') . '-'
: ''
)
. date("Y") ?> | Check-in is an EGI service provided by GRNET, receiving funding from the
<a href="https://www.egi.eu/about/egi-foundation/" target="_blank">EGI Foundation (EGI.eu)</a>
and the <a href="https://eosc-hub.eu" target="_blank">EOSC-hub project</a>
(Horizon 2020) under Grant number 777536 | Powered by <a href="https://github.com/rciam">RCIAM</a>
</div>
</div>
</div>
</div><!-- /row -->
<div class="row">
<div class="col-sm-12 ssp-footer__item ssp-footer__item--ack text-center">
Copyright &copy;<?php
print (strpos($this->t('{themeegi:discopower:copyright_year_start}'), 'not translated') === false)
? $this->t('{themeegi:discopower:copyright_year_start}') . '-'
: '';
print date("Y");
?> | Check-in is an EGI service provided by GRNET, receiving funding from the
<a href="https://www.egi.eu/about/egi-foundation/" target="_blank">EGI Foundation (EGI.eu)</a> and the <a href="https://eosc-hub.eu" target="_blank">EOSC-hub project</a> (Horizon 2020) under Grant number 777536 | Powered by <a href="https://github.com/rciam">RCIAM</a>
</div>
</div>
</div> <!-- /container-fluid -->
</div> <!-- /container-fluid -->
</footer>
<script type="text/javascript"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/cookie.js')); ?>">
</script>
<script type="text/javascript"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/dropdown.js')); ?>">
</script>
<script type="text/javascript"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/modal.js')); ?>">
</script>
<script type="text/javascript"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/tooltip.js')); ?>">
</script>
<script type="text/javascript"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/theme.js')); ?>">
</script>
<script
type="text/javascript"
src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/cookie.js')) ?>"
>
</script>
<script
type="text/javascript"
src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/dropdown.js')) ?>"
>
</script>
<script
type="text/javascript"
src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/modal.js')) ?>"
>
</script>
<script
type="text/javascript"
src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/tooltip.js')) ?>"
>
</script>
<script
type="text/javascript"
src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/theme.js')) ?>"
>
</script>
</body>
</html>
<?php
$themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$ribbonText = $themeConfig->getValue('ribbon_text');
/**
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
*/
$this->data['htmlinject'] = array(
'htmlContentPre' => array(),
'htmlContentPost' => array(),
'htmlContentHead' => array(),
);
$this->data['htmlinject'] = [
'htmlContentPre' => [],
'htmlContentPost' => [],
'htmlContentHead' => [],
];
$jquery = array();
if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery'];
$jquery = [];
if (array_key_exists('jquery', $this->data)) {
$jquery = $this->data['jquery'];
}
if (array_key_exists('pageid', $this->data)) {
$hookinfo = array(
'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);
$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 -
......@@ -42,117 +45,162 @@ header('X-Frame-Options: SAMEORIGIN');
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<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 (strpos($this->t('{themeegi:default:browser_tab_title}'), 'not translated') === FALSE) {
echo $this->t('{themeegi:default:browser_tab_title}');
}
if(array_key_exists('header', $this->data)) { echo (' | ' . $this->data['header']); }
?>
</title>
<link rel="stylesheet" type="text/css" href="<?php echo htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/css/app.css')); ?>" />
<link rel="shortcut icon" type="image/x-icon" href="<?php echo htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/images/logo_site-300x300.png')); ?>" />
<link rel="apple-touch-icon" href="<?php echo htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/images/logo_site-300x300.png')); ?>" />
<?php
if(!empty($jquery)) {
$version = '1.8';
if (array_key_exists('version', $jquery))
$version = $jquery['version'];
if ($version == '1.8') {
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
}
?>
<meta name="robots" content="noindex, nofollow" />
<?php
if(array_key_exists('head', $this->data)) {
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0" />
<script type="text/javascript" src="/<?= $this->data['baseurlpath'] ?>resources/script.js"></script>
<title>
<?php
if (strpos($this->t('{themeegi:default:browser_tab_title}'), 'not translated') === false) {
echo $this->t('{themeegi:default:browser_tab_title}');
}
if (array_key_exists('header', $this->data)) {
echo (' | ' . $this->data['header']);
}
?>
</title>
<link
rel="stylesheet"
type="text/css"
href="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/css/app.css')) ?>"
/>
<link
rel="shortcut icon"
type="image/x-icon"
href="<?= htmlspecialchars(
SimpleSAML\Module::getModuleURL('themeegi/resources/images/logo_site-300x300.png')
) ?>"
/>
<link
rel="apple-touch-icon"
href="<?= htmlspecialchars(
SimpleSAML\Module::getModuleURL('themeegi/resources/images/logo_site-300x300.png')
) ?>"
/>
<?php
if (!empty($jquery)) {
$version = '1.8';
if (array_key_exists('version', $jquery)) {
$version = $jquery['version'];
}
if ($version == '1.8') {
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="/<?= $this->data['baseurlpath'] ?>resources/default-rtl.css" />
<?php endif; ?>
<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 (array_key_exists('autofocus', $this->data)) {
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
}
if (isset($this->data['onLoad'])) {
$onLoad .= $this->data['onLoad'];
$onLoad .= $this->data['onLoad'];
}
if($onLoad !== '') {
$onLoad = ' onload="' . $onLoad . '"';
if ($onLoad !== '') {
$onLoad = ' onload="' . $onLoad . '"';
}
?>
<body<?php echo $onLoad; ?>>
<div class="header">
<?php
if ($this->t('{themeegi:default:ribbon_text}')) {
echo '<div class="corner-ribbon red">';
echo $this->t('{themeegi:default:ribbon_text}');
echo '</div>';
}
?>
<div class="text-center ssp-logo">
<a href="<?php echo $this->t('{themeegi:default:logo_link_url}'); ?>" title="<?php echo $this->t('{themeegi:default:header_title}'); ?>">
<img src="<?php echo SimpleSAML_Module::getModuleURL('themeegi/resources/images/logo.svg'); ?>" alt="EGI" />
</a>
</div>
<h1 class="text-center">
<?php echo $this->t('{themeegi:default:header_title}'); ?>
<small><?php echo $this->t('{themeegi:default:header_subtitle}'); ?></small>
</h1>
</div> <!-- /header -->
<div class="ssp-container" id="content">
<div class="container js-spread">
<?php
if(!empty($this->data['htmlinject']['htmlContentPre'])) {
foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
echo $c;
}
}
<body<?= $onLoad ?>>
<div class="header">
<?php
if (!empty($ribbonText)) {
echo '<div class="corner-ribbon red">';
echo $ribbonText;
echo '</div>';
}
?>
<div class="text-center ssp-logo">
<a
<?=
strpos($this->t('{themeegi:default:logo_link_url}'), 'not translated') === false
? 'href="' . $this->t('{themeegi:default:logo_link_url}') . '"'
: ''
?>
<?=
strpos($this->t('{themeegi:default:header_title}'), 'not translated') === false
? 'title="' . $this->t('{themeegi:default:header_title}') . '"'
: ''
?>
>
<img
src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/logo.svg') ?>"
alt="EGI"
/>
</a>
</div>
<h1 class="text-center">
<?=
strpos($this->t('{themeegi:default:header_title}'), 'not translated') === false
? $this->t('{themeegi:default:header_title}')
: ''
?>
<small>
<?=
strpos($this->t('{themeegi:default:header_subtitle}'), 'not translated') === false
? $this->t('{themeegi:default:header_subtitle}')
: ''
?>
</small>
</h1>
</div> <!-- /header -->
<div class="ssp-container" id="content">
<div class="container js-spread">
<?php
if (!empty($this->data['htmlinject']['htmlContentPre'])) {
foreach ($this->data['htmlinject']['htmlContentPre'] as $c) {
echo $c;
}
}
<?php
// Language names dictionary
$langnames = array(
'no' => 'Bokmål', // Norwegian Bokmål
'nn' => 'Nynorsk', // Norwegian Nynorsk
'se' => 'Sámegiella', // Northern Sami
'sam' => 'Åarjelh-saemien giele', // Southern Sami
'da' => 'Dansk', // Danish
'en' => 'English',
'de' => 'Deutsch', // German
'sv' => 'Svenska', // Swedish
'fi' => 'Suomeksi', // Finnish
'es' => 'Español', // Spanish
'fr' => 'Français', // French
'it' => 'Italiano', // Italian
'nl' => 'Nederlands', // Dutch
'lb' => 'Lëtzebuergesch', // Luxembourgish
'cs' => 'Čeština', // Czech
'sl' => 'Slovenščina', // Slovensk
'lt' => 'Lietuvių kalba', // Lithuanian
'hr' => 'Hrvatski', // Croatian
'hu' => 'Magyar', // Hungarian
'pl' => 'Język polski', // Polish
'pt' => 'Português', // Portuguese
'pt-br' => 'Português brasileiro', // Portuguese
'ru' => 'русский язык', // Russian
'et' => 'eesti keel', // Estonian
'tr' => 'Türkçe', // Turkish
'el' => 'ελληνικά', // Greek
'ja' => '日本語', // Japanese
'zh' => '简体中文', // Chinese (simplified)
'zh-tw' => '繁體中文', // Chinese (traditional)
'ar' => 'العربية', // Arabic
'fa' => 'پارسی', // Persian
'ur' => 'اردو', // Urdu
'he' => 'עִבְרִית', // Hebrew
'id' => 'Bahasa Indonesia', // Indonesian
'sr' => 'Srpski', // Serbian
'lv' => 'Latviešu', // Latvian
'ro' => 'Românește', // Romanian
'eu' => 'Euskara', // Basque
);
$langNames = [
'af' => 'Afrikaans', // Afrikaans
'ar' => 'العربية', // Arabic
'ca' => 'Català', // Catalan
'cs' => 'Čeština', // Czech
'da' => 'Dansk', // Danish
'de' => 'Deutsch', // German
'el' => 'ελληνικά', // Greek
'en' => 'English',
'es' => 'Español', // Spanish
'et' => 'eesti keel', // Estonian
'eu' => 'Euskara', // Basque
'fi' => 'Suomeksi', // Finnish
'fr' => 'Français', // French
'he' => 'עִבְרִית', // Hebrew
'hr' => 'Hrvatski', // Croatian
'hu' => 'Magyar', // Hungarian
'id' => 'Bahasa Indonesia', // Indonesian
'it' => 'Italiano', // Italian
'ja' => '日本語', // Japanese
'lb' => 'Lëtzebuergesch', // Luxembourgish
'lt' => 'Lietuvių kalba', // Lithuanian
'lv' => 'Latviešu', // Latvian
'nl' => 'Nederlands', // Dutch
'nn' => 'Nynorsk', // Norwegian Nynorsk
'no' => 'Bokmål', // Norwegian Bokmål
'pl' => 'Język polski', // Polish
'pt' => 'Português', // Portuguese
'pt-br' => 'Português brasileiro', // Portuguese
'ro' => 'Românește', // Romanian
'ru' => 'русский язык', // Russian
'se' => 'Sámegiella', // Northern Sami
'sl' => 'Slovenščina', // Slovensk
'sr' => 'Srpski', // Serbian
'sv' => 'Svenska', // Swedish
'tr' => 'Türkçe', // Turkish
'xh' => 'isiXhosa', // Xhosa
'zh' => '简体中文', // Chinese (simplified)
'zh-tw' => '繁體中文', // Chinese (traditional)
'zu' => 'IsiZulu', // Zulu
];
$languages = $this->getLanguageList();
?>
<?php if ( count($languages) > 1 ): ?>
<div class="col-sm-12 col-md-4 ssp-footer__item">
<div class="dropup ssp-footer__item__lang">
<?php
$textarray = array();
<?php if (count($languages) > 1) : ?>
<div class="col-sm-12 col-md-4 ssp-footer__item">
<div class="dropup ssp-footer__item__lang">
<?php
$textArray = [];
foreach ($languages as $lang => $current) {
$lang = strtolower($lang);
if ($current) {
$lang_current = $langnames[$lang];
$langCurrent = $langNames[$lang];
} else {
$textarray[] =
$textArray[] =
'<li class="ssp-dropdown__two_cols--item">'
. '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->languageParameterName => $lang))) . '">'
. $langnames[$lang]
. '<a href="' . htmlspecialchars(
\SimpleSAML\Utils\HTTP::addURLParameters(
\SimpleSAML\Utils\HTTP::getSelfURL(),
[$this->getTranslator()->getLanguage()->getLanguageParameterName() => $lang]
)
) . '">'
. $langNames[$lang]
. '</a>'
. '</li>';
}
}
?>
<button class="ssp-btn btn ssp-btn__footer dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<?php print $lang_current; ?>
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-left ssp-dropdown__two_cols" aria-labelledby="dropdownMenu1">
<?php print implode(' ', $textarray); ?>
</ul>
</div> <!-- dropup -->
</div> <!-- col-sm-4 -->
<?php endif; ?>
\ No newline at end of file
?>
<button
class="ssp-btn btn ssp-btn__footer dropdown-toggle"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="true"
>
<?= $langCurrent ?>
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-left ssp-dropdown__two_cols" aria-labelledby="dropdownMenu1">
<?= implode(' ', $textArray) ?>
</ul>
</div> <!-- dropup -->
</div> <!-- col-sm-4 -->
<?php endif;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment