Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 540afac

Browse files
author
Dominik Frantisek Bucik
committed
fix: 🐛 Remove fixed footer for warning_test_sp
Also updated sample configuration file.
1 parent 610c309 commit 540afac

File tree

3 files changed

+12
-38
lines changed

3 files changed

+12
-38
lines changed

config-templates/module_perun.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,15 @@
264264
],
265265

266266
'warning_test_sp_config' => [
267+
// text to be injected into header of the page (h1 element)
267268
'header' => [
268-
'en' => '<h3>Warning - service in test environment</h3>',
269-
'cs' => '<h3>Varování - testovací služba</h3>',
269+
'en' => 'Warning - service in test environment',
270+
'cs' => 'Varování - testovací služba',
270271
],
272+
// Custom text that will be displayed between the header and continue button. Use paragraphs for formatting.
271273
'text' => [
272-
'en' => '<p>Service is in the test environment.<br class="spacer"/>Hit the continue button.</p>',
273-
'cs' => '<p>Služba je v testovacím režimu.<br class="spacer"/>Pokračujte zmáčknutím tlačítka.</p>',
274+
'en' => '<p>Service is in the test environment.<br/>You can access it, but it might not work as expected.</p><p>Hit the continue button.</p>',
275+
'cs' => '<p>Služba je v testovacím režimu.<br/>Služba v testovacím režimu nemusí správně fungovat.</p><p>Pokračujte zmáčknutím tlačítka.</p>',
274276
],
275277
],
276278
];

templates/warning-test-sp-tpl.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,20 @@
1111
* @var Template $this
1212
*/
1313

14-
$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' .
15-
Module::getModuleUrl('perun/res/css/warning_test_sp.css') . '" />';
16-
17-
$this->data['header'] = '';
18-
19-
$this->includeAtTemplateBase('includes/header.php');
2014
$customHeaderEnabled = isset($this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_ENABLED])
2115
&& $this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_ENABLED];
2216
$customTextEnabled = isset($this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_ENABLED])
2317
&& $this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_ENABLED];
18+
19+
$this->data['header'] = $customTextEnabled ?
20+
$this->t(Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_KEY) :
21+
$this->t('{perun:perun:warning-test-sp-tpl_text}');
22+
23+
$this->includeAtTemplateBase('includes/header.php');
2424
?>
2525

2626
<form method="post" action="<?php echo Module::getModuleURL('perun/warning_test_sp_continue.php'); ?>">
27-
2827
<input type="hidden" name="StateId" value="<?php echo $_REQUEST['StateId'] ?>">
29-
<h3><?php echo $customTextEnabled ?
30-
$this->t(Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_KEY) :
31-
$this->t('{perun:perun:warning-test-sp-tpl_text}')
32-
?>
33-
</h3>
3428
<?php
3529
if ($customTextEnabled) {
3630
echo '<div>' . $this->t(Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_KEY) . '</div>' . PHP_EOL;

www/res/css/warning_test_sp.css

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)