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
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. ...@@ -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/), 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). 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 ## [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
- Added comanage loader spinner - Added comanage loader spinner
...@@ -21,23 +52,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -21,23 +52,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made loader spinner configurable - Made loader spinner configurable
- Moved language bar into a shared, stand alone element - 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 ## [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 ### Added
- EGI wrapper template for simple html views - 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 ## [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 ### Changed
- `browser_tab_title` from EGI to Check-in in `default.definition.json` - `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 `<a href=\"%RETRY_URL%\">` from `userid_error.definition.json`::`resolution_description`
- Removed redundant code from `conseform.php` - 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 ## [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 ### Added
- Exception template for attrauthcomanage module - Exception template for attrauthcomanage module
...@@ -46,22 +89,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -46,22 +89,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Custom EGI footer date - 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 ## [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 ### Added
- Static View with information for Email Confirmation - Static View with information for Email Confirmation
- Add style rules and logos for the IdPs: - Add style rules and logos for the IdPs:
- IDPOpen - 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 ## [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 ### Fixed
- Fix bug in IdPs buttons style caused by unclosed html element. - 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 ## [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 ### Changed
- Alter Google login button style due to Google+ deprecation. - 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 ...@@ -76,8 +131,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bitbucket - Bitbucket
- Github - 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 ## [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 ### Added
- Add banner and an extra view for cookies options - 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 ...@@ -94,16 +153,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update footer style - Update footer style
- Render header logo link url customisable - 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 ## [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 ### Changed
- Replace themevanilla -> themeegi - Replace themevanilla -> themeegi
- Use EGI identity (logos, translations) - Use EGI identity (logos, translations)
- Use custom EGI footer - 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 ## [v2.0.0](https://github.com/EGI-Foundation/simplesamlphp-module-themeegi/commits/v2.0.0) - 2018-04-17
<!-- markdownlint-enable line-length -->
### Added ### Added
Create a new theme for SimpleSAMLphp. The theme is a fork from [simplesamlphp-module-themevanilla](https://github.com/rciam/simplesamlphp-module-themevanilla). 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 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). service. The theme is based on the [RCIAM vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla).
Screenshots are available in [screenshots](screenshots/). Screenshots are available in [screenshots](screenshots/).
More information regarding the installation and the customisation of the theme can be found More information regarding the installation and the customisation of the theme
in the [repository of the vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla). can be found in the [repository of the vanilla theme](https://github.com/rciam/simplesamlphp-module-themevanilla).
## Acknowledgement ## 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"> <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 ## License
Licensed under the Apache 2.0 license, for details see `LICENSE`. Licensed under the Apache 2.0 license, for details see `LICENSE`.
<?php <?php
/** /**
* This is example configuration of SimpleSAMLphp themevanila. * This is example configuration of SimpleSAMLphp themevanila.
* Copy this file to default config directory and edit the properties. * Copy this file to default config directory and edit the properties.
...@@ -6,22 +7,83 @@ ...@@ -6,22 +7,83 @@
* copy command (from SimpleSAML base dir) * copy command (from SimpleSAML base dir)
* cp modules/themeegi/module_themeegi.php config/ * 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`
);
?> $config = [
\ No newline at end of file '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 @@ ...@@ -49,7 +49,8 @@
}, },
"login_help_option3_text": { "login_help_option3_text": {
"en": "Contact our <a href='mailto:checkin-support@mailman.egi.eu'>support</a>" "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'); ...@@ -5,14 +5,14 @@ $this->includeAtTemplateBase('includes/header.php');
<div class="body-container" id="content"> <div class="body-container" id="content">
<div class="message-container"> <div class="message-container">
<span class="head-title"> <span class="head-title">
<img class="email-gif" src="resources/icons/email.gif"> <img class="email-gif" src="resources/icons/email.gif">
<h2><span class="title-msg"><?php echo $this->t('{themeegi:default:message_title}'); ?></span></h2> <h2><span class="title-msg"><?= $this->t('{themeegi:default:message_title}') ?></span></h2>
</span> </span>
<div class="message"><?php echo $this->t('{themeegi:default:message_bd}'); ?></div> <div class="message"><?= $this->t('{themeegi:default:message_bd}') ?></div>
<div class="subtitle"><?php echo $this->t('{themeegi:default:message_sub}'); ?></div> <div class="subtitle"><?= $this->t('{themeegi:default:message_sub}') ?></div>
</div> </div>
</div> </div>
<?php <?php
$this->includeAtTemplateBase('includes/footer.php'); ?> $this->includeAtTemplateBase('includes/footer.php');
<?php <?php
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php'); $themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$cookies = $themeConfig->getValue('cookiePolicy'); $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'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<h2><?php echo($this->data['header']); ?></h2> <h2><?= $this->data['header'] ?></h2>
<div> <div>
<ol> <ol>
<li><?php echo(strpos($this->t('{themeegi:policy:purpose_head}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:purpose_head}') : ''); ?></li> <li>
</ol> <?=
<?php echo(strpos($this->t('{themeegi:policy:purpose_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:purpose_body}') : ''); ?> strpos($this->t('{themeegi:policy:purpose_head}'), 'not translated') === false
? $this->t('{themeegi:policy:purpose_head}')
<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> </li>
<?php echo(strpos($this->t('{themeegi:policy:cookie_list_body}'), 'not translated') === FALSE ? $this->t('{themeegi:policy:cookie_list_body}') : ''); ?> </ol>
<?=
<table class="table"> strpos($this->t('{themeegi:policy:purpose_body}'), 'not translated') === false
<thead> ? $this->t('{themeegi:policy:purpose_body}')
<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) {
?> ?>
<tr>
<td><?php echo(isset($row['type']) ? $row['type'] : '');?></td> <ol start="2">
<td><u><?php echo(isset($row['provider']) ? $row['provider'] : '');?></u></td> <li>
<td><?php echo(isset($row['name']) ? $row['name'] : '');?></td> <?=
<td><?php echo(isset($row['thirdParty']) && $row['thirdParty'] ? 'Yes' : 'No' );?></td> strpos($this->t('{themeegi:policy:cookie_list_head}'), 'not translated') === false
<td><?php echo(isset($row['category']) ? $row['category'] : '');?></td> ? $this->t('{themeegi:policy:cookie_list_head}')
<td><?php echo(isset($row['purpose']) ? $row['purpose'] : '');?></td> : ''
</tr> ?>
<?php </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> </div>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?> <?php
$this->includeAtTemplateBase('includes/footer.php');
<?php <?php
// Get Configuration // Get Configuration
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php'); $themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$views = $themeConfig->getValue('views'); $views = $themeConfig->getValue('views');
// Content // Content
$body = $this->t('{themeegi:default:no_content}'); $body = $this->t('{themeegi:default:no_content}');
// Get request parameter and load Content // Get request parameter and load Content
if(!empty($_REQUEST['id']) && !empty($views)) { if (!empty($_REQUEST['id']) && !empty($views)) {
$ld_view = $views[$_REQUEST['id']]; $ldView = $views[$_REQUEST['id']];
$contextOptions = array( $contextOptions = [
'ssl' => array( 'ssl' => [
'verify_peer' => false, 'verify_peer' => false,
), ],
'http' => array( 'http' => [
'timeout' => 2, // 2 Seconds 'timeout' => 2, // 2 Seconds
), ],
); ];
$sslContext = stream_context_create($contextOptions); $sslContext = stream_context_create($contextOptions);
$loaded_content = file_get_contents($ld_view, NULL, $sslContext); $loadedContent = file_get_contents($ldView, null, $sslContext);
if(!empty($loaded_content)) { if (!empty($loadedContent)) {
$body = $loaded_content; $body = $loadedContent;
} }
} }
// Load Head and Dependencies // 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 // Load Header
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
// Load Body // Load Body
print $body; echo $body;
// Load Footer // Load Footer
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
?>
\ No newline at end of file
...@@ -3,13 +3,15 @@ $this->data['header'] = $this->t('{themeegi:attrauthcomanage:exception_header}') ...@@ -3,13 +3,15 @@ $this->data['header'] = $this->t('{themeegi:attrauthcomanage:exception_header}')
$this->includeAtTemplateBase('includes/header.php'); $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> <pre>
<?php <?php
$tag = preg_replace('/attrauthcomanage:/','themeegi:', $this->data['e'], 1); $tag = preg_replace('/attrauthcomanage:/', 'themeegi:', $this->data['e'], 1);
echo (!empty($this->getTag('{'.$tag.'}')) ? $this->t('{'.$tag.'}', $this->data['parameters']) : $this->data['e']); echo !empty($this->getTag('{' . $tag . '}'))
? $this->t('{' . $tag . '}', $this->data['parameters'])
: $this->data['e'];
?> ?>
</pre> </pre>
......
...@@ -5,37 +5,37 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -5,37 +5,37 @@ $this->includeAtTemplateBase('includes/header.php');
?> ?>
<?php <?php if ($this->data['errorcode'] !== null) : ?>
if ($this->data['errorcode'] !== NULL) { <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
?> <img
<div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5"> src="/<?= $this->data['baseurlpath'] ?>resources/icons/experience/gtk-dialog-error.48x48.png"
<img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px" alt="" /> class="float-l"
<h2><?php echo $this->t('{login:error_header}'); ?></h2> style="margin: 15px"
<p><b><?php echo $this->t('{errors:title_' . $this->data['errorcode'] . '}'); ?></b></p> alt=""
<p><?php echo $this->t('{errors:descr_' . $this->data['errorcode'] . '}'); ?></p> />
</div> <h2><?= $this->t('{login:error_header}') ?></h2>
<?php <p><b><?= $this->t('{errors:title_' . $this->data['errorcode'] . '}') ?></b></p>
} <p><?= $this->t('{errors:descr_' . $this->data['errorcode'] . '}') ?></p>
?> </div>
<h2 style="break: both"><?php echo $this->t('{authX509:X509error:certificate_header}'); ?></h2> <?php endif; ?>
<h2 style="break: both"><?= $this->t('{authX509:X509error:certificate_header}') ?></h2>
<p><?php echo $this->t('{authX509:X509error:certificate_text}'); ?></p>
<p><?= $this->t('{authX509:X509error:certificate_text}') ?></p>
<a href="<?php echo htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()); ?>">
<?php echo $this->t('{login:login_button}'); ?> <a href="<?= htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURL()) ?>">
</a> <?= $this->t('{login:login_button}') ?>
</a>
<?php <?php
if(!empty($this->data['links'])) { if (!empty($this->data['links'])) {
echo '<ul class="links list-unstyled" style="margin-top: 2em">'; echo '<ul class="links list-unstyled" style="margin-top: 2em">';
foreach($this->data['links'] AS $l) { foreach ($this->data['links'] as $l) {
echo '<li><a href="' . htmlspecialchars($l['href']) . '">' . htmlspecialchars($this->t($l['text'])) . '</a></li>'; echo '<li><a href="' . htmlspecialchars($l['href']) . '">'
} . htmlspecialchars($this->t($l['text']))
echo '</ul>'; . '</a></li>';
}
echo '</ul>';
} }
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
<?php <?php
/** /**
* Template which is shown when there is only a short interval since the user was last authenticated. * Template which is shown when there is only a short interval since the user was last authenticated.
* *
...@@ -9,20 +10,16 @@ ...@@ -9,20 +10,16 @@
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
$this->data['403_header'] = $this->t('{authorize:Authorize:403_header}'); $this->data['403_header'] = $this->t('{authorize:Authorize:403_header}');
$this->data['403_text'] = $this->t('{authorize:Authorize:403_text}'); $this->data['403_text'] = $this->t('{authorize:Authorize:403_text}');
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<h2><?php echo $this->data['403_header']; ?></h2> <h2><?= $this->data['403_header'] ?></h2>
<p><?php echo $this->data['403_text']; ?></p> <p><?= $this->data['403_text'] ?></p>
<?php <?php if (isset($this->data['LogoutURL'])) : ?>
if (isset($this->data['LogoutURL'])) { <p><a href="<?= htmlspecialchars($this->data['LogoutURL']) ?>"><?= $this->t('{status:logout}') ?></a></p>
?> <?php endif; ?>
<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p>
<?php
}
?>
<?php <?php
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
<?php <?php
// Get Configuration and set the loader // Get Configuration and set the loader
$themeConfig = SimpleSAML_Configuration::getConfig('module_themeegi.php'); $themeConfig = SimpleSAML\Configuration::getConfig('module_themeegi.php');
$loader = $themeConfig->getValue('loader'); $loader = $themeConfig->getValue('loader');
if(!empty($loader)) { if (!empty($loader)) {
$this->includeAtTemplateBase('includes/' . $loader . '.php'); $this->includeAtTemplateBase('includes/' . $loader . '.php');
} }
/** /**
* Template form for giving consent. * Template form for giving consent.
* *
* Parameters: * 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. * - '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. * - 'noTarget': Target URL for the no-button. This URL will receive a GET request.
* - 'noData': Parameters which should be included in the no-request. * - 'sppp': URL to the privacy policy of the destination, or false.
* - 'attributes': The attributes which are about to be released.
* - 'sppp': URL to the privacy policy of the destination, or FALSE.
* *
* @package SimpleSAMLphp * @package SimpleSAMLphp
*/ */
assert('is_array($this->data["srcMetadata"])');
assert('is_array($this->data["dstMetadata"])'); assert(is_string($this->data['yesTarget']));
assert('is_string($this->data["yesTarget"])'); assert(is_string($this->data['noTarget']));
assert('is_array($this->data["yesData"])'); assert($this->data['sppp'] === false || is_string($this->data['sppp']));
assert('is_string($this->data["noTarget"])');
assert('is_array($this->data["noData"])'); // Needed for present_attributes_ssp()
assert('is_array($this->data["attributes"])'); $globalConfig = \SimpleSAML\Configuration::getInstance();
assert('is_array($this->data["hiddenAttributes"])'); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'consent:consentform.php');
assert('$this->data["sppp"] === false || is_string($this->data["sppp"])');
// Parse parameters // Parse parameters
if (array_key_exists('name', $this->data['srcMetadata'])) { $dstName = $this->data['dstName'];
$srcName = $this->data['srcMetadata']['name']; $srcName = $this->data['srcName'];
} elseif (array_key_exists('OrganizationDisplayName', $this->data['srcMetadata'])) {
$srcName = $this->data['srcMetadata']['OrganizationDisplayName'];
} else {
$srcName = $this->data['srcMetadata']['entityid'];
}
if (is_array($srcName)) { $id = $_REQUEST['StateId'];
$srcName = $this->t($srcName); $state = \SimpleSAML\Auth\State::loadState($id, 'consent:request');
}
if (array_key_exists('name', $this->data['dstMetadata'])) { if (array_key_exists('consent:hiddenAttributes', $state)) {
$dstName = $this->data['dstMetadata']['name']; $t->data['hiddenAttributes'] = $state['consent:hiddenAttributes'];
} elseif (array_key_exists('OrganizationDisplayName', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['OrganizationDisplayName'];
} else { } else {
$dstName = $this->data['dstMetadata']['entityid']; $t->data['hiddenAttributes'] = [];
}
if (is_array($dstName)) {
$dstName = $this->t($dstName);
} }
$srcName = htmlspecialchars($srcName);
$dstName = htmlspecialchars($dstName);
$attributes = $this->data['attributes']; $attributes = $this->data['attributes'];
$this->data['header'] = $this->t('{consent:consent:consent_header}'); $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'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<h2 class="text-center"><?= $this->data['consent_accept'] ?></h2>
<?php <div class="row js-spread">
<div class="col-sm-12 ssp-content-group js-spread">
/**
* Recursive attribute array listing function <?php
* echo $this->data['attributes_html'] = present_attributes_ssp($t, $attributes, '');
* @param SimpleSAML_XHTML_Template $t Template object
* @param array $attributes Attributes to be presented /**
* @param string $nameParent Name of parent element * Recursive attribute array listing function
* *
* @return string HTML representation of the attributes * @param \SimpleSAML\XHTML\Template $t Template object
*/ * @param array $attributes Attributes to be presented
function present_attributes($t, $attributes, $nameParent) * @param string $nameParent Name of parent element
{ *
$alternate = array('ssp-table--tr__odd', 'ssp-table--tr__even'); * @return string HTML representation of the attributes
$i = 0; */
$summary = 'summary="' . $t->t('{consent:consent:table_summary}') . '"'; function present_attributes_ssp($t, $attributes, $nameParent)
{
if (strlen($nameParent) > 0) { $translator = $t->getTranslator();
$parentStr = strtolower($nameParent) . '_';
$str = '<div class="ssp-attrs--container"><table class="table" ' . $summary . '>'; $alternate = ['ssp-table--tr__odd', 'ssp-table--tr__even'];
} else { $i = 0;
$parentStr = ''; $summary = 'summary="' . $translator->t('{consent:consent:table_summary}') . '"';
$str = '<div class="ssp-attrs--container js-spread"><table id="table_with_attributes" class="table" '. $summary .'>';
} if (strlen($nameParent) > 0) {
$parentStr = strtolower($nameParent) . '_';
foreach ($attributes as $name => $value) { $str = '<div class="ssp-attrs--container"><table class="table" ' . $summary . '>';
$nameraw = $name; } else {
$name = $t->getAttributeTranslation($parentStr . $nameraw); $parentStr = '';
$str = '<div class="ssp-attrs--container js-spread"><table id="table_with_attributes" class="table" '
if (preg_match('/^child_/', $nameraw)) { . $summary . '>';
// 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>';
} }
} else {
// insert values directly
$str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] . foreach ($attributes as $name => $value) {
'"><td><div class="attrname ssp-table--attrname">' . htmlspecialchars($name) . '</div>'; $nameRaw = $name;
$name = $translator->getAttributeTranslation($parentStr . $nameRaw);
$isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true); if (preg_match('/^child_/', $nameRaw)) {
if ($isHidden) { // insert child table
$hiddenId = SimpleSAML\Utils\Random::generateID(); $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 . '">'; $str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] .
} else { '"><td><div class="attrname ssp-table--attrname">' . htmlspecialchars($name) . '</div>';
$str .= '<div class="attrvalue ssp-table--attrvalue">';
}
if (sizeof($value) > 1) { $isHidden = in_array($nameRaw, $t->data['hiddenAttributes'], true);
// we hawe several values if ($isHidden) {
$str .= '<ul class="list-unstyled ssp-table--attrvalue--list">'; $hiddenId = \SimpleSAML\Utils\Random::generateID();
foreach ($value as $listitem) { $str .= '<div class="attrvalue ssp-table--attrvalue" style="display: none;" id="hidden_'
if ($nameraw === 'jpegPhoto') { . $hiddenId . '">';
$str .= '<li class="ssp-table--attrvalue--list--item"><img src="data:image/jpeg;base64,' .
htmlspecialchars($listitem) .
'" alt="User photo" /></li>';
} else { } 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">' . if (sizeof($value) > 1) {
$this->t( // we have several values
'{consent:consent:consent_accept}', $str .= '<ul class="list-unstyled ssp-table--attrvalue--list">';
array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName)). foreach ($value as $listItem) {
'</h2> if ($nameRaw === 'jpegPhoto') {
<div class="row js-spread"> $str .= '<li class="ssp-table--attrvalue--list--item">'
<div class="col-sm-12 ssp-content-group js-spread">'; . '<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 $str .= '</td></tr>';
echo present_attributes($this, $attributes, ''); } // end else: not child table
?> } // end foreach
<div class="ssp-btns-container"> $str .= isset($attributes) ? '</table></div>' : '';
<form style="display: inline-block" return $str;
action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>"> }
<p class"ssp-btns-container--checkbox> ?>
<?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 <?php
if ($this->data['usestorage']) { if ($this->data['sppp'] !== false) {
$checked = ($this->data['checked'] ? 'checked="checked"' : ''); echo "<p>" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " ";
echo '<input type="checkbox" name="saveconsent" ' . $checked . echo '<a target="_blank" href="' . htmlspecialchars($this->data['sppp']) . '">' . $dstName . "</a>";
' value="1" /> ' . $this->t('{consent:consent:remember}'); 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'); $this->includeAtTemplateBase('includes/footer.php');
?>
<?php <?php
$this->data['header'] = $this->t('{logout:title}'); $this->data['header'] = $this->t('{logout:title}');
$this->data['jquery'] = ['core' => true];
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
echo('<h2>' . $this->data['header'] . '</h2>'); echo ('<h2>' . $this->data['header'] . '</h2>');
echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>'); echo ('<p>' . $this->t('{logout:logged_out_text}') . '</p>');
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
<?php <?php
if (array_key_exists('name', $this->data['dstMetadata'])) { $this->data['header'] = $this->t('{consent:consent:noconsent_title}');
$dstName = $this->data['dstMetadata']['name']; $this->data['jquery'] = ['core' => true];
} 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->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
echo '<h3>' . $this->data['header'] . '</h3>'; 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">'; echo '<div class="ssp-btns-container">';
if ($this->data['resumeFrom']) { 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 (
echo($this->t('{consent:consent:noconsent_return}')); '<a href="' . htmlspecialchars($this->data['resumeFrom'])
echo('</a>'); . '" 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']) { if ($this->data['aboutService']) {
echo('<a href="' . htmlspecialchars($this->data['aboutService']) . '" class="ssp-btn btn text-uppercase">'); echo ('<a href="' . htmlspecialchars($this->data['aboutService']) . '" class="ssp-btn btn text-uppercase">');
echo($this->t('{consent:consent:noconsent_goto_about}')); echo ($this->t('{consent:consent:noconsent_goto_about}'));
echo('</a>'); 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 echo '</div>'; //ssp-btns-container
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
...@@ -9,14 +9,15 @@ $retry = htmlspecialchars($this->t('{core:no_cookie:retry}')); ...@@ -9,14 +9,15 @@ $retry = htmlspecialchars($this->t('{core:no_cookie:retry}'));
$this->data['header'] = $header; $this->data['header'] = $header;
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
?>
echo('<h2>' . $header . '</h2>'); <h2><?= $header ?></h2>
echo('<p>' . $description . '</p>'); <p><?= $description ?></p>
if ($retryURL !== NULL) { <?php if ($retryURL !== null) : ?>
echo('<ul class="list-unstyled">'); <ul class="list-unstyled">
echo('<li><a href="' . htmlspecialchars($retryURL) . '" id="retry">' . $retry . '</a></li>'); <li><a href="<?= htmlspecialchars($retryURL) ?>" id="retry"><?= $retry ?></a></li>
echo('</ul>'); </ul>
} <?php endif;
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
<?php <p><?= $this->t('{core:no_metadata:config_problem}') ?></p>
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>');
<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 <h2><?= $this->t('{core:no_state:suggestions}') ?></h2>
<ul class="list-nstyled">
echo('<h2>' . $this->t('{core:no_state:suggestions}') . '</h2>'); <li><?= $this->t('{core:no_state:suggestion_badlink}') ?></li>
echo('<ul class="list-unstyled">'); <li><?= $this->t('{core:no_state:suggestion_goback}') ?></li>
echo('<li>' . $this->t('{core:no_state:suggestion_goback}') . '</li>'); <li><?= $this->t('{core:no_state:suggestion_closebrowser}') ?></li>
echo('<li>' . $this->t('{core:no_state:suggestion_closebrowser}') . '</li>'); </ul>
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>');
<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 <?php
$this->data['header'] = $this->t($this->data['dictTitle']); $this->data['header'] = $this->t($this->data['dictTitle']);
$this->data['jquery'] = array('core' => TRUE); $this->data['jquery'] = ['core' => true];
$this->data['head'] = <<<EOF $this->data['head'] = <<<EOF
<meta name="robots" content="noindex, nofollow" /> <meta name="robots" content="noindex, nofollow" />
...@@ -9,7 +9,7 @@ EOF; ...@@ -9,7 +9,7 @@ EOF;
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<h2><?php echo $this->t($this->data['dictTitle']); ?></h2> <h2><?= $this->t($this->data['dictTitle']) ?></h2>
<?php <?php
echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters'])); echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
...@@ -18,61 +18,61 @@ if (isset($this->data['includeTemplate'])) { ...@@ -18,61 +18,61 @@ if (isset($this->data['includeTemplate'])) {
$this->includeAtTemplateBase($this->data['includeTemplate']); $this->includeAtTemplateBase($this->data['includeTemplate']);
} }
?> ?>
<div class="trackidtext"> <div class="trackidtext">
<p><?php echo $this->t('report_trackid'); ?></p> <p><?= $this->t('report_trackid') ?></p>
<div class="input-group"> <div class="input-group">
<input class="form-control" type="text" readonly id="trackid" value="<?php echo $this->data['error']['trackId']; ?>"> <input class="form-control" type="text" readonly id="trackid" value="<?= $this->data['error']['trackId'] ?>">
<span class="input-group-btn" aria-hidden="true"> <span class="input-group-btn" aria-hidden="true">
<button data-clipboard-target="#trackid" id="btntrackid" class="btn btn-default ssp-btn--copy"> <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'; ?>" <img
alt="Copy to clipboard" /> src="/<?= $this->data['baseurlpath'] . 'resources/icons/clipboard.svg' ?>"
alt="Copy to clipboard"
/>
</button> </button>
</span> </span>
</div>
</div> </div>
</div>
<?php <?php
// print out exception only if the exception is available // print out exception only if the exception is available
if ($this->data['showerrors']) { if ($this->data['showerrors']) : ?>
?> <h2><?= $this->t('debuginfo_header') ?></h2>
<h2><?php echo $this->t('debuginfo_header'); ?></h2> <p><?= $this->t('debuginfo_text') ?></p>
<p><?php echo $this->t('debuginfo_text'); ?></p>
<div style="border: 1px solid #eee; padding: 1em; font-size: x-small"> <div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
<p style="margin: 1px"><?php echo htmlspecialchars($this->data['error']['exceptionMsg']); ?></p> <p style="margin: 1px"><?= htmlspecialchars($this->data['error']['exceptionMsg']) ?></p>
<pre style="padding: 1em; font-family: monospace;"><?php <pre style="padding: 1em; font-family: monospace;">
echo htmlspecialchars($this->data['error']['exceptionTrace']); ?></pre> <?= htmlspecialchars($this->data['error']['exceptionTrace']) ?>
</pre>
</div> </div>
<?php <?php endif;
}
/* Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if /* 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. * the technical contact email address has been set.
*/ */
if (isset($this->data['errorReportAddress'])) { if (isset($this->data['errorReportAddress'])) : ?>
?> <h2><?= $this->t('report_header') ?></h2>
<h2><?php echo $this->t('report_header'); ?></h2> <form action="<?= htmlspecialchars($this->data['errorReportAddress']) ?>" method="post">
<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post"> <p><?= $this->t('report_text') ?></p>
<p><?php echo $this->t('report_text'); ?></p> <p><?= $this->t('report_email') ?>
<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?= htmlspecialchars($this->data['email']) ?>" />
<input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
</p> </p>
<p> <p>
<textarea class="metadatabox" name="text" rows="6" cols="50" style="width: 100%; padding: 0.5em;"><?php <textarea class="metadatabox" name="text" rows="6" cols="50" style="width: 100%; padding: 0.5em;">
echo $this->t('report_explain'); ?></textarea> <?= $this->t('report_explain') ?>
</textarea>
</p> </p>
<p> <p>
<input type="hidden" name="reportId" value="<?php echo $this->data['error']['reportId']; ?>"/> <input type="hidden" name="reportId" value="<?= $this->data['error']['reportId'] ?>"/>
<button type="submit" name="send" class="btn"><?php echo $this->t('report_submit'); ?></button> <button type="submit" name="send" class="btn"><?= $this->t('report_submit') ?></button>
</p> </p>
</form> </form>
<?php <?php endif; ?>
} <h2 style="clear: both"><?= $this->t('howto_header') ?></h2>
?> <p><?= $this->t('howto_text') ?></p>
<h2 style="clear: both"><?php echo $this->t('howto_header'); ?></h2> <script type="text/javascript">
<p><?php echo $this->t('howto_text'); ?></p> var clipboard = new Clipboard('#btntrackid');
<script type="text/javascript"> </script>
var clipboard = new Clipboard('#btntrackid');
</script>
<?php <?php
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
<?php <?php
if(!empty($this->data['htmlinject']['htmlContentPost'])) { if (!empty($this->data['htmlinject']['htmlContentPost'])) {
foreach($this->data['htmlinject']['htmlContentPost'] as $c) { foreach ($this->data['htmlinject']['htmlContentPost'] as $c) {
print $c; echo $c;
} }
} }
?> ?>
</div><!-- /container --> </div><!-- /container -->
</div><!-- /ssp-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): ?> <?php
<!-- cookies popup --> if (
<div id="cookies"> strpos($this->t('{themeegi:discopower:cookies_text}'), 'not translated') === false
<div id="cookies-wrapper"> || strpos($this->t('{themeegi:discopower:cookies_accept_btn_text}'), 'not translated') === false
<p> ) : ?>
<?php print $this->t('{themeegi:discopower:cookies_text}'); ?> <!-- cookies popup -->
<?php if(strpos($this->t('{themeegi:discopower:cookies_link_text}'), 'not translated') === false): ?> <div id="cookies">
<a href="<?php print $this->t('{themeegi:discopower:cookies_link_url}'); ?>" target="_blank"><?php print $this->t('{themeegi:discopower:cookies_link_text}'); ?></a> <div id="cookies-wrapper">
<?php endif; ?> <p>
</p> <?= $this->t('{themeegi:discopower:cookies_text}') ?>
<a id="js-accept-cookies" class="cookies-ok" href="#"> <?php
<?php print $this->t('{themeegi:discopower:cookies_accept_btn_text}'); ?> if (strpos($this->t('{themeegi:discopower:cookies_link_text}'), 'not translated') === false) : ?>
</a> <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>
</div> <!-- /cookies popup -->
<!-- /cookies popup -->
<?php endif; ?> <?php endif; ?>
<footer class="ssp-footer text-center"> <footer class="ssp-footer text-center">
<div class="container-fluid ssp-footer--container container"> <div class="container-fluid ssp-footer--container container">
<div class="row ssp-content-group--footer"> <div class="row ssp-content-group--footer">
<!-- Add language bar --> <!-- Add language bar -->
<?php <?php
$includeLanguageBar = (!empty($_POST)) ? false : true; $includeLanguageBar = (!empty($_POST)) ? false : true;
$includeLanguageBar = (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === true) ? 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
<div class="col-sm-12 col-md-4 ssp-footer__item ssp-footer__item--images text-center"> class="ssp-footer__item__logo"
<a href="https://grnet.gr/"> src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/grnet_logo_en.svg') ?>"
<img class="ssp-footer__item__logo" src="<?php print SimpleSAML_Module::getModuleURL('themeegi/resources/images/grnet_logo_en.svg'); ?>" alt="GRNET" /> alt="GRNET"
</a> />
<img class="ssp-footer__item__logo--eu" src="<?php print SimpleSAML_Module::getModuleURL('themeegi/resources/images/eu.svg'); ?>" alt="European Union" /> </a>
</div> <img
<div class="col-sm-12 col-md-4 ssp-footer__item"> class="ssp-footer__item__logo--eu"
<div class="ssp-footer__item__links"> src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/eu.svg') ?>"
<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> 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> </div> <!-- /container-fluid -->
</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 -->
</footer> </footer>
<script type="text/javascript" <script
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/cookie.js')); ?>"> type="text/javascript"
</script> src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/cookie.js')) ?>"
>
<script type="text/javascript" </script>
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/dropdown.js')); ?>"> <script
</script> type="text/javascript"
<script type="text/javascript" src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/dropdown.js')) ?>"
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/modal.js')); ?>"> >
</script> </script>
<script type="text/javascript" <script
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/tooltip.js')); ?>"> type="text/javascript"
</script> src="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themeegi/resources/js/modal.js')) ?>"
<script type="text/javascript" >
src="<?php print htmlspecialchars(SimpleSAML_Module::getModuleURL('themeegi/resources/js/theme.js')); ?>"> </script>
</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> </body>
</html> </html>
<?php <?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. * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
*/ */
$this->data['htmlinject'] = array( $this->data['htmlinject'] = [
'htmlContentPre' => array(), 'htmlContentPre' => [],
'htmlContentPost' => array(), 'htmlContentPost' => [],
'htmlContentHead' => array(), 'htmlContentHead' => [],
); ];
$jquery = array(); $jquery = [];
if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery']; if (array_key_exists('jquery', $this->data)) {
$jquery = $this->data['jquery'];
}
if (array_key_exists('pageid', $this->data)) { if (array_key_exists('pageid', $this->data)) {
$hookinfo = array( $hookinfo = [
'pre' => &$this->data['htmlinject']['htmlContentPre'], 'pre' => &$this->data['htmlinject']['htmlContentPre'],
'post' => &$this->data['htmlinject']['htmlContentPost'], 'post' => &$this->data['htmlinject']['htmlContentPost'],
'head' => &$this->data['htmlinject']['htmlContentHead'], 'head' => &$this->data['htmlinject']['htmlContentHead'],
'jquery' => &$jquery, 'jquery' => &$jquery,
'page' => $this->data['pageid'] 'page' => $this->data['pageid']
); ];
SimpleSAML_Module::callHooks('htmlinject', $hookinfo); SimpleSAML\Module::callHooks('htmlinject', $hookinfo);
} }
// - o - o - o - o - o - o - o - o - o - o - o - o - // - o - o - o - o - o - o - o - o - o - o - o - o -
...@@ -42,117 +45,162 @@ header('X-Frame-Options: SAMEORIGIN'); ...@@ -42,117 +45,162 @@ header('X-Frame-Options: SAMEORIGIN');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-US"> <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" /> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<?php <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0" />
if(array_key_exists('head', $this->data)) { <script type="text/javascript" src="/<?= $this->data['baseurlpath'] ?>resources/script.js"></script>
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->'; <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> </head>
<?php <?php
$onLoad = ''; $onLoad = '';
if(array_key_exists('autofocus', $this->data)) { if (array_key_exists('autofocus', $this->data)) {
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');'; $onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
} }
if (isset($this->data['onLoad'])) { if (isset($this->data['onLoad'])) {
$onLoad .= $this->data['onLoad']; $onLoad .= $this->data['onLoad'];
} }
if($onLoad !== '') { if ($onLoad !== '') {
$onLoad = ' onload="' . $onLoad . '"'; $onLoad = ' onload="' . $onLoad . '"';
} }
?> ?>
<body<?php echo $onLoad; ?>> <body<?= $onLoad ?>>
<div class="header"> <div class="header">
<?php <?php
if ($this->t('{themeegi:default:ribbon_text}')) { if (!empty($ribbonText)) {
echo '<div class="corner-ribbon red">'; echo '<div class="corner-ribbon red">';
echo $this->t('{themeegi:default:ribbon_text}'); echo $ribbonText;
echo '</div>'; echo '</div>';
} }
?> ?>
<div class="text-center ssp-logo"> <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}'); ?>"> <a
<img src="<?php echo SimpleSAML_Module::getModuleURL('themeegi/resources/images/logo.svg'); ?>" alt="EGI" /> <?=
</a> strpos($this->t('{themeegi:default:logo_link_url}'), 'not translated') === false
</div> ? 'href="' . $this->t('{themeegi:default:logo_link_url}') . '"'
<h1 class="text-center"> : ''
<?php echo $this->t('{themeegi:default:header_title}'); ?> ?>
<small><?php echo $this->t('{themeegi:default:header_subtitle}'); ?></small> <?=
</h1> strpos($this->t('{themeegi:default:header_title}'), 'not translated') === false
</div> <!-- /header --> ? 'title="' . $this->t('{themeegi:default:header_title}') . '"'
<div class="ssp-container" id="content"> : ''
<div class="container js-spread"> ?>
>
<img
<?php src="<?= SimpleSAML\Module::getModuleURL('themeegi/resources/images/logo.svg') ?>"
alt="EGI"
if(!empty($this->data['htmlinject']['htmlContentPre'])) { />
foreach($this->data['htmlinject']['htmlContentPre'] AS $c) { </a>
echo $c; </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 <?php
// Language names dictionary // Language names dictionary
$langnames = array( $langNames = [
'no' => 'Bokmål', // Norwegian Bokmål 'af' => 'Afrikaans', // Afrikaans
'nn' => 'Nynorsk', // Norwegian Nynorsk 'ar' => 'العربية', // Arabic
'se' => 'Sámegiella', // Northern Sami 'ca' => 'Català', // Catalan
'sam' => 'Åarjelh-saemien giele', // Southern Sami 'cs' => 'Čeština', // Czech
'da' => 'Dansk', // Danish 'da' => 'Dansk', // Danish
'en' => 'English', 'de' => 'Deutsch', // German
'de' => 'Deutsch', // German 'el' => 'ελληνικά', // Greek
'sv' => 'Svenska', // Swedish 'en' => 'English',
'fi' => 'Suomeksi', // Finnish 'es' => 'Español', // Spanish
'es' => 'Español', // Spanish 'et' => 'eesti keel', // Estonian
'fr' => 'Français', // French 'eu' => 'Euskara', // Basque
'it' => 'Italiano', // Italian 'fi' => 'Suomeksi', // Finnish
'nl' => 'Nederlands', // Dutch 'fr' => 'Français', // French
'lb' => 'Lëtzebuergesch', // Luxembourgish 'he' => 'עִבְרִית', // Hebrew
'cs' => 'Čeština', // Czech 'hr' => 'Hrvatski', // Croatian
'sl' => 'Slovenščina', // Slovensk 'hu' => 'Magyar', // Hungarian
'lt' => 'Lietuvių kalba', // Lithuanian 'id' => 'Bahasa Indonesia', // Indonesian
'hr' => 'Hrvatski', // Croatian 'it' => 'Italiano', // Italian
'hu' => 'Magyar', // Hungarian 'ja' => '日本語', // Japanese
'pl' => 'Język polski', // Polish 'lb' => 'Lëtzebuergesch', // Luxembourgish
'pt' => 'Português', // Portuguese 'lt' => 'Lietuvių kalba', // Lithuanian
'pt-br' => 'Português brasileiro', // Portuguese 'lv' => 'Latviešu', // Latvian
'ru' => 'русский язык', // Russian 'nl' => 'Nederlands', // Dutch
'et' => 'eesti keel', // Estonian 'nn' => 'Nynorsk', // Norwegian Nynorsk
'tr' => 'Türkçe', // Turkish 'no' => 'Bokmål', // Norwegian Bokmål
'el' => 'ελληνικά', // Greek 'pl' => 'Język polski', // Polish
'ja' => '日本語', // Japanese 'pt' => 'Português', // Portuguese
'zh' => '简体中文', // Chinese (simplified) 'pt-br' => 'Português brasileiro', // Portuguese
'zh-tw' => '繁體中文', // Chinese (traditional) 'ro' => 'Românește', // Romanian
'ar' => 'العربية', // Arabic 'ru' => 'русский язык', // Russian
'fa' => 'پارسی', // Persian 'se' => 'Sámegiella', // Northern Sami
'ur' => 'اردو', // Urdu 'sl' => 'Slovenščina', // Slovensk
'he' => 'עִבְרִית', // Hebrew 'sr' => 'Srpski', // Serbian
'id' => 'Bahasa Indonesia', // Indonesian 'sv' => 'Svenska', // Swedish
'sr' => 'Srpski', // Serbian 'tr' => 'Türkçe', // Turkish
'lv' => 'Latviešu', // Latvian 'xh' => 'isiXhosa', // Xhosa
'ro' => 'Românește', // Romanian 'zh' => '简体中文', // Chinese (simplified)
'eu' => 'Euskara', // Basque 'zh-tw' => '繁體中文', // Chinese (traditional)
); 'zu' => 'IsiZulu', // Zulu
];
$languages = $this->getLanguageList(); $languages = $this->getLanguageList();
?> ?>
<?php if ( count($languages) > 1 ): ?> <?php if (count($languages) > 1) : ?>
<div class="col-sm-12 col-md-4 ssp-footer__item"> <div class="col-sm-12 col-md-4 ssp-footer__item">
<div class="dropup ssp-footer__item__lang"> <div class="dropup ssp-footer__item__lang">
<?php <?php
$textarray = array(); $textArray = [];
foreach ($languages as $lang => $current) { foreach ($languages as $lang => $current) {
$lang = strtolower($lang); $lang = strtolower($lang);
if ($current) { if ($current) {
$lang_current = $langnames[$lang]; $langCurrent = $langNames[$lang];
} else { } else {
$textarray[] = $textArray[] =
'<li class="ssp-dropdown__two_cols--item">' '<li class="ssp-dropdown__two_cols--item">'
. '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->languageParameterName => $lang))) . '">' . '<a href="' . htmlspecialchars(
. $langnames[$lang] \SimpleSAML\Utils\HTTP::addURLParameters(
\SimpleSAML\Utils\HTTP::getSelfURL(),
[$this->getTranslator()->getLanguage()->getLanguageParameterName() => $lang]
)
) . '">'
. $langNames[$lang]
. '</a>' . '</a>'
. '</li>'; . '</li>';
} }
} }
?> ?>
<button class="ssp-btn btn ssp-btn__footer dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <button
<?php print $lang_current; ?> class="ssp-btn btn ssp-btn__footer dropdown-toggle"
<span class="caret"></span> type="button"
</button> data-toggle="dropdown"
<ul class="dropdown-menu dropdown-menu-left ssp-dropdown__two_cols" aria-labelledby="dropdownMenu1"> aria-haspopup="true"
<?php print implode(' ', $textarray); ?> aria-expanded="true"
</ul> >
</div> <!-- dropup --> <?= $langCurrent ?>
</div> <!-- col-sm-4 --> <span class="caret"></span>
<?php endif; ?> </button>
\ No newline at end of file <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