|
1 | 1 | <?php declare(strict_types=1); |
2 | 2 |
|
3 | 3 | use SimpleSAML\Module; |
| 4 | +use SimpleSAML\Module\perun\Auth\Process\WarningTestSP; |
4 | 5 | use SimpleSAML\XHTML\Template; |
5 | 6 |
|
6 | 7 | /** |
|
11 | 12 | * @var Template $this |
12 | 13 | */ |
13 | 14 |
|
14 | | -$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' . |
15 | | - Module::getModuleUrl('perun/res/css/warning_test_sp.css') . '" />'; |
| 15 | +$customHeaderEnabled = isset($this->data[WarningTestSP::CUSTOM_HEADER_ENABLED]) |
| 16 | + && $this->data[WarningTestSP::CUSTOM_HEADER_ENABLED]; |
| 17 | +$customTextEnabled = isset($this->data[WarningTestSP::CUSTOM_TEXT_ENABLED]) |
| 18 | + && $this->data[WarningTestSP::CUSTOM_TEXT_ENABLED]; |
16 | 19 |
|
17 | | -$this->data['header'] = ''; |
| 20 | +$this->data['header'] = $customTextEnabled ? |
| 21 | + $this->t(WarningTestSP::CUSTOM_HEADER_KEY) : |
| 22 | + $this->t('{perun:perun:warning-test-sp-tpl_text}'); |
18 | 23 |
|
19 | 24 | $this->includeAtTemplateBase('includes/header.php'); |
20 | | -$customHeaderEnabled = isset($this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_ENABLED]) |
21 | | - && $this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_HEADER_ENABLED]; |
22 | | -$customTextEnabled = isset($this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_ENABLED]) |
23 | | - && $this->data[Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_ENABLED]; |
24 | 25 | ?> |
25 | 26 |
|
26 | 27 | <form method="post" action="<?php echo Module::getModuleURL('perun/warning_test_sp_continue.php'); ?>"> |
27 | | - |
28 | 28 | <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> |
34 | 29 | <?php |
35 | 30 | if ($customTextEnabled) { |
36 | | - echo '<div>' . $this->t(Module\perun\Auth\Process\WarningTestSP::CUSTOM_TEXT_KEY) . '</div>' . PHP_EOL; |
| 31 | + echo '<div>' . $this->t(WarningTestSP::CUSTOM_TEXT_KEY) . '</div>' . PHP_EOL; |
37 | 32 | } |
38 | 33 | ?> |
39 | 34 | <br/> |
|
0 commit comments