|
2 |
$this->includeAtTemplateBase('includes/header.php'); |
2 |
$this->includeAtTemplateBase('includes/header.php'); |
3 |
|
3 |
|
4 |
$this->data['header'] = $this->t('{login:user_pass_header}'); |
4 |
$this->data['header'] = $this->t('{login:user_pass_header}'); |
|
|
5 |
|
6 |
$PW_EXPIRED = $this->data['errorcode'] !== NULL && in_array($this->data['errorcode'], array('LDAP_PWCHANGE', 'KRB_PWCHANGE', 'SAMBA_PWCHANGE')); |
7 |
// echo '<pre>'; var_dump($this->data); echo '</pre>'; |
5 |
?> |
8 |
?> |
6 |
<div id="umcLoginWrapper"> |
9 |
<div id="umcLoginWrapper"> |
7 |
<h1 style="text-align: center;"><?php echo htmlspecialchars(sprintf($this->t('{univentiontheme:login:loginat}'), $this->configuration->getValue('domainname', ''))); ?></h1> |
10 |
<h1 style="text-align: center;"><?php echo htmlspecialchars($this->t('{univentiontheme:login:loginat}', array('%s' => $this->configuration->getValue('domainname', '')))); ?></h1> |
8 |
<?php |
11 |
<?php |
9 |
if (isset($this->data['SPMetadata']['privacypolicy'])) { |
12 |
if (isset($this->data['SPMetadata']['privacypolicy'])) { |
10 |
printf('<h3 style="text-align: center;"><a href="%s">%s</a></h3>', htmlspecialchars($this->data['SPMetadata']['privacypolicy'], ENT_QUOTES), htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}'))); |
13 |
printf('<h3 style="text-align: center;"><a href="%s">%s</a></h3>', htmlspecialchars($this->data['SPMetadata']['privacypolicy'], ENT_QUOTES), htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}'))); |
Lines 17-45
if (isset($this->data['SPMetadata']['privacypolicy'])) {
|
Link Here
|
---|
|
17 |
<img id="umcLoginLogo" src="/univention/js/dijit/themes/umc/images/login_logo.svg"/> |
20 |
<img id="umcLoginLogo" src="/univention/js/dijit/themes/umc/images/login_logo.svg"/> |
18 |
</div> |
21 |
</div> |
19 |
<div class="umcLoginFormWrapper"> |
22 |
<div class="umcLoginFormWrapper"> |
20 |
<div id="umcLoginNotices" class="umcLoginNotices" style="display: none;"></div> |
23 |
<div id="umcLoginNotices" class="umcLoginNotices" style="display: <?php echo $this->data['errorcode'] !== NULL ? 'block' : 'none'; ?>;"> |
21 |
<form id="umcLoginForm" name="umcLoginForm" action="?" method="post" class="umcLoginForm" autocomplete="on"> |
|
|
22 |
<label for="umcLoginUsername"> |
23 |
<input placeholder="<?php echo htmlspecialchars($this->t('{login:username}'), ENT_QUOTES); ?>" id="umcLoginUsername" name="username" type="text" autocomplete="username" tabindex="1" value="<?php echo htmlspecialchars($this->data['username'], ENT_QUOTES); ?>" <?php echo $this->data['forceUsername'] ? 'readonly' : ''; ?>/> |
24 |
</label> |
25 |
<label for="umcLoginPassword"> |
26 |
<input placeholder="<?php echo htmlspecialchars($this->t('{login:password}'), ENT_QUOTES); ?>" id="umcLoginPassword" name="password" type="password" tabindex="2" autocomplete="current-password"/> |
27 |
</label> |
28 |
<div id="umcLoginWarnings" class="umcLoginWarnings"> |
29 |
<?php |
24 |
<?php |
30 |
/* |
|
|
31 |
if ($this->data['errorcode'] !== NULL) { |
32 |
echo('<span class="logintitle">' . $this->t('{login:help_header}') . '</span>'); |
33 |
echo('<span class="logintext">' . $this->t('{login:help_text}') . '</span>'); |
34 |
} |
35 |
*/ |
36 |
|
37 |
if ($this->data['errorcode'] !== NULL) { |
25 |
if ($this->data['errorcode'] !== NULL) { |
38 |
?> |
26 |
?> |
39 |
<p class="umcLoginWarning" > |
27 |
<p class="umcLoginWarning" > |
40 |
<b><?php echo htmlspecialchars($this->t('{univentiontheme:errors:title_' . $this->data['errorcode'] . '}', $this->data['errorparams'])); ?>.</b><br> |
28 |
<b><?php echo htmlspecialchars($this->t('{univentiontheme:errors:title_' . $this->data['errorcode'] . '}', $this->data['errorparams'])); ?>.</b><br> |
41 |
<?php |
29 |
<?php |
42 |
if (in_array($this->data['errorcode'], array('LDAP_PWCHANGE', 'KRB_PWCHANGE', 'SAMBA_PWCHANGE'))) { |
30 |
if ($PW_EXPIRED) { |
43 |
$password_change_url = $this->configuration->getValue('password_change_url', ''); |
31 |
$password_change_url = $this->configuration->getValue('password_change_url', ''); |
44 |
$password_change_url = $password_change_url ? $password_change_url : str_replace('/univention/saml/metadata', '/univention/login/', $this->data['SPMetadata']['entityid']); |
32 |
$password_change_url = $password_change_url ? $password_change_url : str_replace('/univention/saml/metadata', '/univention/login/', $this->data['SPMetadata']['entityid']); |
45 |
echo '<span style="color: black;">'; |
33 |
echo '<span style="color: black;">'; |
Lines 55-60
if (in_array($this->data['errorcode'], array('LDAP_PWCHANGE', 'KRB_PWCHANGE', 'S
|
Link Here
|
---|
|
55 |
<?php |
43 |
<?php |
56 |
} |
44 |
} |
57 |
?> |
45 |
?> |
|
|
46 |
</div> |
47 |
<form id="umcLoginForm" name="umcLoginForm" action="?" method="post" class="umcLoginForm" autocomplete="on" <?php if ($PW_EXPIRED) { echo 'style="display: none; "'; } ?>> |
48 |
<label for="umcLoginUsername"> |
49 |
<input placeholder="<?php echo htmlspecialchars($this->t('{login:username}'), ENT_QUOTES); ?>" id="umcLoginUsername" name="username" type="text" autocomplete="username" tabindex="1" value="<?php echo htmlspecialchars($this->data['username'], ENT_QUOTES); ?>" <?php echo $this->data['forceUsername'] ? 'readonly' : ''; ?>/> |
50 |
</label> |
51 |
<label for="umcLoginPassword"> |
52 |
<input placeholder="<?php echo htmlspecialchars($this->t('{login:password}'), ENT_QUOTES); ?>" id="umcLoginPassword" name="password" type="password" tabindex="2" autocomplete="current-password"/> |
53 |
</label> |
54 |
<div id="umcLoginWarnings" class="umcLoginWarnings"> |
58 |
</div> |
55 |
</div> |
59 |
<?php |
56 |
<?php |
60 |
foreach ($this->data['stateparams'] as $name => $value) { |
57 |
foreach ($this->data['stateparams'] as $name => $value) { |
Lines 90-97
foreach ($this->data['organizations'] as $orgId => $orgDesc) {
|
Link Here
|
---|
|
90 |
<?php |
87 |
<?php |
91 |
} |
88 |
} |
92 |
?> |
89 |
?> |
93 |
<input id="umcLoginSubmit" type="submit" name="submit" value="Login"/> |
90 |
<input id="umcLoginSubmit" type="submit" name="submit" value="<?php echo htmlspecialchars($this->t('{login:login}'), ENT_QUOTES); ?>"/> |
|
|
91 |
</form> |
92 |
|
93 |
<?php |
94 |
if ($PW_EXPIRED) { |
95 |
?> |
96 |
<form id="umcNewPasswordForm" name="umcLoginForm" action="?" method="post" class="umcLoginForm" autocomplete="off" style="display: block;"> |
97 |
<input name="username" type="hidden" value="<?php echo htmlspecialchars($this->data['username'], ENT_QUOTES); ?>" /> |
98 |
<input name="password" type="hidden" value="<?php echo htmlspecialchars($_REQUEST['password'], ENT_QUOTES); /* TODO: store instead in the session? */ ?>" /> |
99 |
<label for="umcLoginNewPassword"> |
100 |
<input id="umcLoginNewPassword" name="new_password" type="password" autocomplete="new-password" placeholder="<?php echo htmlspecialchars($this->t('{login:new_password}'), ENT_QUOTES); ?>"> |
101 |
</label> |
102 |
<label for="umcLoginNewPasswordRetype"> |
103 |
<input id="umcLoginNewPasswordRetype" type="password" autocomplete="new-password" placeholder="<?php echo htmlspecialchars($this->t('{login:new_password_retype}'), ENT_QUOTES); ?>"> |
104 |
</label> |
105 |
<input id="umcNewPasswordSubmit" type="submit" name="submit" value="<?php echo htmlspecialchars($this->t('{login:change_password}'), ENT_QUOTES); ?>"> |
106 |
<?php |
107 |
foreach ($this->data['stateparams'] as $name => $value) { |
108 |
echo '<input type="hidden" name="' . htmlspecialchars($name, ENT_QUOTES) . '" value="' . htmlspecialchars($value, ENT_QUOTES) . '" />'; |
109 |
} |
110 |
?> |
94 |
</form> |
111 |
</form> |
|
|
112 |
<?php |
113 |
} |
114 |
?> |
115 |
|
95 |
</div> |
116 |
</div> |
96 |
</div> |
117 |
</div> |
97 |
<div id="umcLoginLinks"></div> |
118 |
<div id="umcLoginLinks"></div> |