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

Commit 531f4e6

Browse files
Merge pull request #45 from vyskocilpavel/einfraidp_theme
feat: prepare theme:einfra_idp
2 parents 18012d3 + 9c3abf1 commit 531f4e6

File tree

10 files changed

+669
-0
lines changed

10 files changed

+669
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include \SimpleSAML\Module::getModuleDir('perun') . '/themes/perun/consent/consentform.php';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include \SimpleSAML\Module::getModuleDir('perun') . '/themes/perun/consent/noconsent.php';
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?php declare(strict_types=1);
2+
3+
$this->data['header'] = $this->t('{cesnet:einfra:user_pass_header}');
4+
5+
if (strlen($this->data['username']) > 0) {
6+
$this->data['autofocus'] = 'password';
7+
} else {
8+
$this->data['autofocus'] = 'username';
9+
}
10+
11+
$this->includeAtTemplateBase('includes/header.php');
12+
13+
if ($this->data['errorcode'] !== null) {
14+
?>
15+
<div class="alert alert-danger">
16+
<span class="glyphicon glyphicon-exclamation-sign"
17+
style="float:left; font-size: 38px; margin-right: 10px;"></span>
18+
19+
<strong>
20+
<?php
21+
echo htmlspecialchars($this->t('{cesnet:einfra:loginuserpass_error_title}')); ?>
22+
</strong>
23+
24+
<p>
25+
<?php
26+
echo htmlspecialchars($this->t('{cesnet:einfra:loginuserpass_error_text}')); ?>
27+
</p>
28+
</div>
29+
30+
<?php
31+
}
32+
?>
33+
34+
<p><?php echo $this->t('{cesnet:einfra:user_pass_text}'); ?></p>
35+
36+
<br>
37+
38+
<form action="?" method="post" name="f" class="form-horizontal">
39+
40+
<div class="form-group">
41+
<label for="username" class="col-sm-2 control-label">
42+
<?php echo $this->t('{cesnet:einfra:username}'); ?>
43+
</label>
44+
<div class="col-sm-10">
45+
<input id="username" <?php echo ($this->data['forceUsername']) ? 'disabled="disabled"' : ''; ?>
46+
type="text" name="username" class="form-control"
47+
<?php
48+
if (! $this->data['forceUsername']) {
49+
echo 'tabindex="1"';
50+
}
51+
?> value="<?php echo htmlspecialchars($this->data['username']); ?>"/>
52+
</div>
53+
</div>
54+
55+
<div class="form-group">
56+
<label for="password" class="col-sm-2 control-label"><?php echo $this->t('{login:password}'); ?></label>
57+
<div class="col-sm-10">
58+
<input id="password" type="password" tabindex="2" name="password" class="form-control"/>
59+
</div>
60+
</div>
61+
62+
<?php
63+
if ($this->data['rememberUsernameEnabled'] && ! $this->data['forceUsername']) {
64+
// display the "remember my username" checkbox?>
65+
<div class="form-group">
66+
<div class="col-sm-offset-2 col-sm-10">
67+
<div class="checkbox">
68+
<label>
69+
<input type="checkbox" id="remember_username" tabindex="4"
70+
<?php echo ($this->data['rememberUsernameChecked']) ? 'checked="checked"' : ''; ?>
71+
name="remember_username" value="Yes"/>
72+
<?php echo $this->t('{login:remember_username}'); ?>
73+
</label>
74+
</div>
75+
</div>
76+
</div>
77+
<?php
78+
}
79+
?>
80+
81+
<?php
82+
if ($this->data['rememberMeEnabled']) {
83+
// display the remember me checkbox (keep me logged in)?>
84+
<div class="form-group">
85+
<div class="col-sm-offset-2 col-sm-10">
86+
<div class="checkbox">
87+
<label>
88+
<input type="checkbox" id="remember_me" tabindex="5"
89+
<?php echo ($this->data['rememberMeChecked']) ? 'checked="checked"' : ''; ?>
90+
name="remember_me" value="Yes"/>
91+
<?php echo $this->t('{login:remember_me}'); ?>
92+
</label>
93+
</div>
94+
</div>
95+
</div>
96+
<?php
97+
}
98+
?>
99+
100+
<?php
101+
if (array_key_exists('organizations', $this->data)) {
102+
?>
103+
<div class="form-group">
104+
<label for="organization"
105+
class="col-sm-2 control-label"><?php echo $this->t('{login:organization}'); ?></label>
106+
<div class="col-sm-10">
107+
<select name="organization" tabindex="3" class="form-control">
108+
<?php
109+
if (array_key_exists('selectedOrg', $this->data)) {
110+
$selectedOrg = $this->data['selectedOrg'];
111+
} else {
112+
$selectedOrg = null;
113+
}
114+
115+
foreach ($this->data['organizations'] as $orgId => $orgDesc) {
116+
if (is_array($orgDesc)) {
117+
$orgDesc = $this->t($orgDesc);
118+
}
119+
120+
if ($orgId === $selectedOrg) {
121+
$selected = 'selected="selected" ';
122+
} else {
123+
$selected = '';
124+
}
125+
126+
echo '<option ' .
127+
$selected . 'value="' . htmlspecialchars($orgId) . '">' . htmlspecialchars($orgDesc) .
128+
'</option>';
129+
} ?>
130+
</select>
131+
</div>
132+
</div>
133+
<?php
134+
}
135+
?>
136+
137+
<div class="form-group">
138+
<div class="col-sm-offset-2 col-sm-10">
139+
<button class="btn btn-success"
140+
onclick="this.value='<?php echo $this->t('{login:processing}'); ?>';
141+
this.disabled=true; this.form.submit(); return true;" tabindex="6">
142+
<?php echo $this->t('{login:login_button}'); ?>
143+
</button>
144+
</div>
145+
</div>
146+
147+
<?php
148+
foreach ($this->data['stateparams'] as $name => $value) {
149+
echo '<input type="hidden" name="' . htmlspecialchars($name) .
150+
'" value="' . htmlspecialchars($value) . '" />'
151+
;
152+
}
153+
?>
154+
</form>
155+
156+
<?php
157+
158+
if (! empty($this->data['links'])) {
159+
echo '<ul class="links" style="margin-top: 2em">';
160+
foreach ($this->data['links'] as $l) {
161+
echo '<li>' .
162+
'<a href="' . htmlspecialchars($l['href']) . '">' . htmlspecialchars($this->t($l['text'])) . '</a>' .
163+
'</li>';
164+
}
165+
echo '</ul>';
166+
}
167+
168+
$this->includeAtTemplateBase('includes/footer.php');
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include \SimpleSAML\Module::getModuleDir('perun') . '/themes/perun/default/error.php';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include \SimpleSAML\Module::getModuleDir('perun') . '/themes/perun/default/errorreport.php';
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php declare(strict_types=1);
2+
3+
use SimpleSAML\Module;
4+
5+
if (! empty($this->data['htmlinject']['htmlContentPost'])) {
6+
foreach ($this->data['htmlinject']['htmlContentPost'] as $c) {
7+
echo $c;
8+
}
9+
}
10+
11+
?>
12+
13+
</div><!-- #content -->
14+
</div><!-- #wrap -->
15+
16+
<div id="footer">
17+
18+
<footer>
19+
<div class="container">
20+
<div class="row">
21+
<div class="col-md-4 logo">
22+
<img src="<?php echo Module::getModuleUrl('cesnet/res/img/footer_logo.png') ?>" >
23+
</div>
24+
<div class="col-md-8">
25+
<div class="row">
26+
<div class="col col-sm-6">
27+
<h2> <?php echo $this->t('{cesnet:einfra:footer_other_links}'); ?></h2>
28+
<ul>
29+
<li><?php echo '<a href="' . $this->t('{cesnet:einfra_links:einfra_link}') . '">' .
30+
$this->t('{cesnet:einfra_links:einfra_name}') . '</a>'; ?></li>
31+
<li><?php echo '<a href="' . $this->t('{cesnet:einfra_links:cesnet_link}') . '">' .
32+
$this->t('{cesnet:einfra_links:cesnet_name}') . '</a>'; ?></li>
33+
<li><?php echo '<a href="' . $this->t('{cesnet:einfra_links:ceritsc_link}') . '">' .
34+
$this->t('{cesnet:einfra_links:ceritsc_name}') . '</a>'; ?></li>
35+
<li><?php echo '<a href="' . $this->t('{cesnet:einfra_links:it4i_link}') . '">' .
36+
$this->t('{cesnet:einfra_links:it4i_name}') . '</a>'; ?></li>
37+
</ul>
38+
</div>
39+
<div class="col col-sm-6">
40+
<h2><?php echo $this->t('{cesnet:einfra:footer_helpdesk}'); ?></h2>
41+
TEL: +420 234 680 222<br>
42+
GSM: +420 602 252 531<br>
43+
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
<div class="row">
49+
<div class="col col-sm-12 copyright">
50+
© <?php echo date('Y'); ?> | <a href="https://www.e-infra.cz">e-INFRA CZ</a>
51+
</div>
52+
</div>
53+
</div>
54+
</footer>
55+
</div><!-- #footer -->
56+
57+
</body>
58+
</html>

0 commit comments

Comments
 (0)