Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 092391a

Browse files
author
Billy Clark
committed
request via Trello board to support expiry pages
1 parent 2a512d6 commit 092391a

File tree

5 files changed

+179
-1
lines changed

5 files changed

+179
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
{
3+
"title": {
4+
"en": "Expiring password",
5+
"es": "TODO",
6+
"fr": "TODO",
7+
"ko": "TODO"
8+
},
9+
"header": {
10+
"en": "Password expiring soon",
11+
"es": "TODO",
12+
"fr": "TODO",
13+
"ko": "TODO"
14+
},
15+
"expiring_in_a_day": {
16+
"en": "Your password will expire in one day.",
17+
"es": "TODO",
18+
"fr": "TODO",
19+
"ko": "TODO"
20+
},
21+
"expiring_soon": {
22+
"en": "Your password will expire in {daysLeft} days.",
23+
"es": "TODO",
24+
"fr": "TODO",
25+
"ko": "TODO"
26+
},
27+
"change_now": {
28+
"en": "Would you like to go ahead and change it now?",
29+
"es": "TODO",
30+
"fr": "TODO",
31+
"ko": "TODO"
32+
},
33+
"button_change": {
34+
"en": "Yes",
35+
"es": "TODO",
36+
"fr": "TODO",
37+
"ko": "TODO"
38+
},
39+
"button_continue": {
40+
"en": "Maybe later",
41+
"es": "TODO",
42+
"fr": "TODO",
43+
"ko": "TODO"
44+
}
45+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
{
3+
"title": {
4+
"en": "Expired password",
5+
"es": "TODO",
6+
"fr": "TODO",
7+
"ko": "TODO"
8+
},
9+
"header": {
10+
"en": "Password expired",
11+
"es": "TODO",
12+
"fr": "TODO",
13+
"ko": "TODO"
14+
},
15+
"expired": {
16+
"en": "Your password has expired and must be changed before continuing.",
17+
"es": "Su contraseña ha caducado y debe cambiarse antes de continuar.",
18+
"fr": "Votre mot de passe a expiré et doit être modifié avant de continuer.",
19+
"ko": "비밀번호가 만료되었으므로 계속하기 전에 비밀번호를 변경해야합니다."
20+
},
21+
"button_change": {
22+
"en": "Change",
23+
"es": "Cambiar",
24+
"fr": "Changer",
25+
"ko": "바꾸다"
26+
}
27+
}

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ services:
3939
SECRET_SALT: "8yC5mb4wqANaU+Rxrl4DHkfKzikeieXkltfFd+YDzx8="
4040
IDP_NAME: "Idp 1"
4141
idp2:
42-
image: silintl/ssp-base:feature_add-expirychecker-0-1-0
42+
image: silintl/ssp-base:develop
4343
volumes:
4444
- ./development/idp2/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
4545
- ./development/idp2/enable:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/enable
4646
- ./development/idp2/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
4747
- ./development/idp2/saml20-idp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-hosted.php
4848
- ./development/idp2/saml20-sp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-sp-remote.php
4949
- ./:/data/vendor/simplesamlphp/simplesamlphp/modules/material
50+
#TODO: get an appsdev logo in here for testing purposes so the logo's not missing. (put one in /development and volume it into the correct location.
5051
ports:
5152
- '8086:80'
5253
environment:
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><?= $this->t('{material:about2expire:title}') ?></title>
5+
6+
<?php include __DIR__ . '/../common-head-elements.php' ?>
7+
</head>
8+
<body>
9+
<div class="mdl-layout mdl-layout--fixed-header fill-viewport">
10+
<header class="mdl-layout__header">
11+
<div class="mdl-layout__header-row">
12+
<span class="mdl-layout-title">
13+
<?= $this->t('{material:about2expire:header}') ?>
14+
</span>
15+
</div>
16+
</header>
17+
<!--TODO: do we need ?? null on these data[] retrievals as done in other pages? Test what happens when the key is altered to a nonexistent name -->
18+
<main class="mdl-layout__content" layout-children="column">
19+
<!-- TODO: since this is just a GET back to itself, I don't think action is needed at all...need to test in other browsers to make sure though. -->
20+
<form action="<?= htmlentities($this->data['formTarget']); ?>" layout-children="column">
21+
<?php
22+
foreach ($this->data['formData'] as $name => $value) {
23+
?>
24+
<input type="hidden" name="<?= htmlentities($name); ?>"
25+
value="<?= htmlentities($value); ?>"/>
26+
<?php
27+
}
28+
?>
29+
30+
<p class="mdl-typography--title margin">
31+
<?php
32+
$daysLeft = $this->data['daysLeft'] ?? 0;
33+
$expiringMessage = $daysLeft < 2 ?
34+
$this->t('{material:about2expire:expiring_in_a_day}') :
35+
$this->t('{material:about2expire:expiring_soon}',
36+
['{daysLeft}' => $daysLeft]);
37+
?>
38+
<?= $expiringMessage ?>
39+
</p>
40+
41+
<p class="mdl-typography--body-1">
42+
<?= $this->t('{material:about2expire:change_now}') ?>
43+
</p>
44+
45+
<div class="fill-parent" layout-children="row" child-spacing="space-around">
46+
<button type="submit" name="continue" class="mdl-button mdl-button--raised">
47+
<?= $this->t('{material:about2expire:button_continue}') ?>
48+
</button>
49+
50+
<button type="submit" name="changepwd"
51+
class="mdl-button mdl-button--raised mdl-button--primary">
52+
<?= $this->t('{material:about2expire:button_change}') ?>
53+
</button>
54+
</div>
55+
</form>
56+
</main>
57+
58+
<?php include __DIR__ . '/../common-footer.php' ?>
59+
</div>
60+
</body>
61+
</html>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><?= $this->t('{material:expired:title}') ?></title>
5+
6+
<?php include __DIR__ . '/../common-head-elements.php' ?>
7+
</head>
8+
<body>
9+
<div class="mdl-layout mdl-layout--fixed-header fill-viewport">
10+
<header class="mdl-layout__header mdl-color--red">
11+
<div class="mdl-layout__header-row">
12+
<span class="mdl-layout-title">
13+
<?= $this->t('{material:expired:header}') ?>
14+
</span>
15+
</div>
16+
</header>
17+
<!--TODO: do we need ?? null on these data[] retrievals as done in other pages? Test what happens when the key is altered to a nonexistent name -->
18+
<main class="mdl-layout__content" layout-children="column">
19+
<!-- TODO: since this is just a GET back to itself, I don't think action is needed at all...need to test in other browsers to make sure though. -->
20+
<form action="<?= htmlentities($this->data['formTarget']); ?>" layout-children="column">
21+
<?php
22+
foreach ($this->data['formData'] as $name => $value) {
23+
?>
24+
<input type="hidden" name="<?= htmlentities($name); ?>"
25+
value="<?= htmlentities($value); ?>"/>
26+
<?php
27+
}
28+
?>
29+
30+
<p class="mdl-typography--title margin">
31+
<?= $this->t('{material:expired:expired}') ?>
32+
</p>
33+
34+
<button type="submit" name="changepwd"
35+
class="mdl-button mdl-button--raised mdl-button--primary">
36+
<?= $this->t('{material:expired:button_change}') ?>
37+
</button>
38+
</form>
39+
</main>
40+
41+
<?php include __DIR__ . '/../common-footer.php' ?>
42+
</div>
43+
</body>
44+
</html>

0 commit comments

Comments
 (0)