Merge pull request 'Fixing issue with implementation test run 1' (#2) from karolds-patch-1 into master
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
This file indicates that the default state of this module
|
||||
is disabled. To enable, create a file named enable in the
|
||||
same directory as this file.
|
||||
@@ -75,4 +75,4 @@ if (isset($this->data['errorReportAddress'])) {
|
||||
var clipboard = new Clipboard('#btntrackid');
|
||||
</script>
|
||||
<?php
|
||||
$this->includeAtTemplateBase('includes/footer.php');
|
||||
$this->includeAtTemplateBase('includes/footer.twig');
|
||||
|
||||
54
themes/pvv/default/error.twig
Normal file
54
themes/pvv/default/error.twig
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<title>{{ t(dictTitle) }}</title>
|
||||
<link rel="stylesheet" href="{{ getModuleURL('themepvv/style.css') }}" type="text/css">
|
||||
{% set header = t(dictTitle) %}
|
||||
{% set head = '<meta name="robots" content="noindex, nofollow" />\n<meta name="googlebot" content="noarchive, nofollow" />' %}
|
||||
<h1>{{ t(dictTitle) }}</h1>
|
||||
<div class="maintext">
|
||||
{{ t(dictDescr, parameters)|escape }}
|
||||
{% if includeTemplate is defined %}
|
||||
{% include includeTemplate %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="trackidtext">
|
||||
<p>{{ t('report_trackid') }}</p>
|
||||
<div class="input-group" style="width: 1em;">
|
||||
<pre id="trackid" class="input-left">{{ error.trackId }}</pre>
|
||||
<button data-clipboard-target="#trackid" id="btntrackid" class="btnaddonright">
|
||||
<img src="/{{ baseurlpath }}resources/icons/clipboard.svg"
|
||||
alt="Copy to clipboard">
|
||||
</button>
|
||||
</div>
|
||||
{% if showerrors %}
|
||||
<h2>{{ t('debuginfo_header') }}</h2>
|
||||
<p>{{ t('debuginfo_text') }}</p>
|
||||
|
||||
<div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
|
||||
<p style="margin: 1px">{{ error.exceptionMsg|escape }}</p>
|
||||
<pre style="padding: 1em; font-family: monospace;">{{ error.exceptionTrace|escape }}</pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if errorReportAddress is defined %}
|
||||
<h2>{{ t('report_header') }}</h2>
|
||||
<form action="{{ errorReportAddress|escape }}" method="post">
|
||||
<p>{{ t('report_text') }}</p>
|
||||
<p>{{ t('report_email') }}
|
||||
<input type="text" size="25" name="email" value="{{ email|escape }}" />
|
||||
</p>
|
||||
<p>
|
||||
<textarea class="metadatabox" name="text" rows="6" style="width: 100%; padding: 0.5em;">{{ t('report_explain') }}</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="hidden" name="reportId" value="{{ error.reportId }}"/>
|
||||
<button type="submit" name="send" class="btn">{{ t('report_submit') }}</button>
|
||||
</p>
|
||||
</form>
|
||||
{% endif %}
|
||||
?>
|
||||
<h2 style="clear: both">{{ t('howto_header') }}</h2>
|
||||
<p>{{ t('howto_text') }}</p>
|
||||
<script type="text/javascript">
|
||||
var clipboard = new Clipboard('#btntrackid');
|
||||
</script>
|
||||
{% include 'includes/footer.php' %}
|
||||
11
themes/pvv/default/includes/footer.twig
Normal file
11
themes/pvv/default/includes/footer.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
{% if htmlinject.htmlContentPost %}
|
||||
{% for c in htmlinject.htmlContentPost %}
|
||||
{{ c }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
160
themes/pvv/default/includes/header.twig
Normal file
160
themes/pvv/default/includes/header.twig
Normal file
@@ -0,0 +1,160 @@
|
||||
{# Support the htmlinject hook, which allows modules to change header, pre and post body on all pages. #}
|
||||
{% set htmlinject = {
|
||||
'htmlContentPre': [],
|
||||
'htmlContentPost': [],
|
||||
'htmlContentHead': [],
|
||||
} %}
|
||||
|
||||
{% set jquery = jquery|default([]) %}
|
||||
|
||||
{% if pageid is defined %}
|
||||
{% set hookinfo = {
|
||||
'pre': htmlinject.htmlContentPre,
|
||||
'post': htmlinject.htmlContentPost,
|
||||
'head': htmlinject.htmlContentHead,
|
||||
'jquery': jquery,
|
||||
'page': pageid
|
||||
} %}
|
||||
{# SimpleSAML_Module::callHooks('htmlinject', hookinfo); #}
|
||||
{% endif %}<!DOCTYPE html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0" />
|
||||
<script type="text/javascript" src="/{{ baseurlpath }}resources/script.js"></script>
|
||||
<title>{{ header|default('SimpleSAMLphp') }}</title>
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="/{{ baseurlpath }}resources/default.css" /> -->
|
||||
<link rel="icon" type="image/icon" href="/{{ baseurlpath }}resources/icons/favicon.ico" />
|
||||
|
||||
{% if jquery is not empty %}
|
||||
{% set version = jquery.version|default('1.8') %}
|
||||
|
||||
{% if version == '1.8' %}
|
||||
{% if jquery.core|default(false) %}
|
||||
<script type="text/javascript" src="/{{ baseurlpath }}resources/jquery-1.8.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if jquery.ui|default(false) %}
|
||||
<script type="text/javascript" src="/{{ baseurlpath }}resources/jquery-ui-1.8.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if jquery.css|default(false) %}
|
||||
<link rel="stylesheet" media="screen" type="text/css" href="/{{ baseurlpath }}resources/uitheme1.8/jquery-ui.css" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if clipboard_js is defined %}
|
||||
<script type="text/javascript" src="/{{ baseurlpath }}resources/clipboard.min.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if htmlinject.htmlContentHead is not empty %}
|
||||
{% for c in htmlinject.htmlContentHead %}
|
||||
{{ c|raw }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
|
||||
{% if head is defined %}
|
||||
<!-- head -->{{ head|raw }}<!-- /head -->
|
||||
{% endif %}
|
||||
</head>
|
||||
{% set onLoad = '' %}
|
||||
{% if autofocus is defined %}
|
||||
{% set onLoad = onLoad ~ "SimpleSAML_focus('" ~ autofocus ~ "');" %}
|
||||
{% endif %}
|
||||
{% if onLoad_js is defined %}
|
||||
{% set onLoad = onLoad ~ onLoad_js %}
|
||||
{% endif %}
|
||||
|
||||
{% if onLoad != '' %}
|
||||
<body onload="{{ onLoad }}">
|
||||
{% else %}
|
||||
<body>
|
||||
{% endif %}
|
||||
|
||||
<h1><a href="/{{ baseurlpath }}">{{ header|default('SimpleSAMLphp') }}</a></h1>
|
||||
|
||||
|
||||
{% set includeLanguageBar = true %}
|
||||
{% if _POST is not empty %}
|
||||
{% set includeLanguageBar = false %}
|
||||
{% endif %}
|
||||
{% if hideLanguageBar is defined and hideLanguageBar == true %}
|
||||
{% set includeLanguageBar = false %}
|
||||
{% endif %}
|
||||
|
||||
{% if includeLanguageBar %}
|
||||
|
||||
{% set languages = getLanguageList() %}
|
||||
{% if languages|length > 1 %}
|
||||
<div id="languagebar">
|
||||
{% set langnames = {
|
||||
'no': 'Bokmål',
|
||||
'nn': 'Nynorsk',
|
||||
'se': 'Sámegiella',
|
||||
'sam': 'Åarjelh-saemien giele',
|
||||
'da': 'Dansk',
|
||||
'en': 'English',
|
||||
'de': 'Deutsch',
|
||||
'sv': 'Svenska',
|
||||
'fi': 'Suomeksi',
|
||||
'es': 'Español',
|
||||
'fr': 'Français',
|
||||
'it': 'Italiano',
|
||||
'nl': 'Nederlands',
|
||||
'lb': 'Lëtzebuergesch',
|
||||
'cs': 'Čeština',
|
||||
'sl': 'Slovenščina',
|
||||
'lt': 'Lietuvių kalba',
|
||||
'hr': 'Hrvatski',
|
||||
'hu': 'Magyar',
|
||||
'pl': 'Język polski',
|
||||
'pt': 'Português',
|
||||
'pt-br': 'Português brasileiro',
|
||||
'ru': 'русский язык',
|
||||
'et': 'eesti keel',
|
||||
'tr': 'Türkçe',
|
||||
'el': 'ελληνικά',
|
||||
'ja': '日本語',
|
||||
'zh': '简体中文',
|
||||
'zh-tw': '繁體中文',
|
||||
'ar': 'العربية',
|
||||
'fa': 'پارسی',
|
||||
'ur': 'اردو',
|
||||
'he': 'עִבְרִית',
|
||||
'id': 'Bahasa Indonesia',
|
||||
'sr': 'Srpski',
|
||||
'lv': 'Latviešu',
|
||||
'ro': 'Românește',
|
||||
'eu': 'Euskara',
|
||||
} %}
|
||||
|
||||
{% set textarray = [] %}
|
||||
{% for lang, current in languages %}
|
||||
{% if current %}
|
||||
{% set textarray = textarray|merge([langnames[lang|lower]]) %}
|
||||
{% else %}
|
||||
{% set url = addURLParameters(getSelfURL(), {languageParameterName: lang}) %}
|
||||
{% set textarray = textarray|merge(['<a href="' ~ url ~ '">' ~ langnames[lang|lower] ~ '</a>']) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{{ textarray|join(' | ')|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<main>
|
||||
|
||||
|
||||
|
||||
{% if htmlinject.htmlContentPre is not empty %}
|
||||
{% for c in htmlinject.htmlContentPre %}
|
||||
{{ c|raw }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user