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

Commit 04fe5f3

Browse files
author
Billy Clark
committed
recommend MFA to users without it yet.
1 parent 6c4d90e commit 04fe5f3

File tree

6 files changed

+121
-2
lines changed

6 files changed

+121
-2
lines changed

dictionaries/mfa.definition.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,48 @@
6060
"fr": "TODO",
6161
"ko": "TODO"
6262
},
63+
"shield_icon": {
64+
"en": "Shield icon",
65+
"es": "TODO",
66+
"fr": "TODO",
67+
"ko": "TODO"
68+
},
69+
"nag_header": {
70+
"en": "Protect yourself",
71+
"es": "TODO",
72+
"fr": "TODO",
73+
"ko": "TODO"
74+
},
75+
"nag_info": {
76+
"en": "Did you know you could easily increase the security of your account by enabling 2-step verification?",
77+
"es": "TODO",
78+
"fr": "TODO",
79+
"ko": "TODO"
80+
},
6381
"button_verify": {
6482
"en": "Verify",
6583
"es": "TODO",
6684
"fr": "TODO",
6785
"ko": "TODO"
6886
},
87+
"button_later": {
88+
"en": "Remind me later",
89+
"es": "TODO",
90+
"fr": "TODO",
91+
"ko": "TODO"
92+
},
93+
"button_learn_more": {
94+
"en": "Learn more",
95+
"es": "TODO",
96+
"fr": "TODO",
97+
"ko": "TODO"
98+
},
99+
"button_enable": {
100+
"en": "Enable now",
101+
"es": "TODO",
102+
"fr": "TODO",
103+
"ko": "TODO"
104+
},
69105
"remember_this": {
70106
"en": "Remember this computer for 30 days",
71107
"es": "TODO",
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><?= $this->t('{material:mfa:title}') ?></title>
5+
6+
<?php include __DIR__ . '/../common-head-elements.php' ?>
7+
</head>
8+
<body class="gradient-bg">
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:mfa:header}') ?>
14+
</span>
15+
</div>
16+
</header>
17+
<main class="mdl-layout__content" layout-children="column">
18+
<form layout-children="column"> <!-- TODO: change method to POST once implemented -->
19+
<?php
20+
foreach ($this->data['formData'] as $name => $value) {
21+
?>
22+
<input type="hidden" name="<?= htmlentities($name); ?>"
23+
value="<?= htmlentities($value); ?>"/>
24+
<?php
25+
}
26+
?>
27+
<div class="mdl-card mdl-shadow--8dp">
28+
<div class="mdl-card__media white-bg margin" layout-children="column">
29+
<img src="/module.php/material/mfa-shield.svg"
30+
alt="<?= $this->t('{material:mfa:shield_icon}') ?>">
31+
</div>
32+
33+
<div class="mdl-card__title center">
34+
<h1 class="mdl-card__title-text">
35+
<?= $this->t('{material:mfa:nag_header}') ?>
36+
</h1>
37+
</div>
38+
39+
<div class="mdl-card__title center" >
40+
<p class="mdl-card__subtitle-text">
41+
<?= $this->t('{material:mfa:nag_info}') ?>
42+
</p>
43+
</div>
44+
45+
<div class="mdl-card__actions" layout-children="row" child-spacing="space-around">
46+
<button type="submit" name="continue" class="mdl-button">
47+
<?= $this->t('{material:mfa:button_later}') ?>
48+
</button>
49+
50+
<span flex></span>
51+
52+
<?php
53+
$url = $this->data['learnMoreUrl'] ?? null;
54+
$url = "//example.org"; //TODO: remove when available
55+
if (! empty($url)) {
56+
?>
57+
<a href="<?= htmlentities($url) ?>" target="_blank"
58+
class="mdl-button mdl-button--primary margin">
59+
<?= $this->t('{material:mfa:button_learn_more}') ?>
60+
</a>
61+
<?php
62+
}
63+
?>
64+
65+
<button type="submit" name="setUpMfa"
66+
class="mdl-button mdl-button--raised mdl-button--primary">
67+
<?= $this->t('{material:mfa:button_enable}') ?>
68+
</button>
69+
</div>
70+
</div>
71+
</form>
72+
</main>
73+
</div>
74+
</body>
75+
</html>

themes/material/mfa/prompt-for-mfa-backupcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<form layout-children="column" method="POST">
1919
<?php
2020
foreach ($this->data['formData'] as $name => $value) {
21-
?>
21+
?>
2222
<input type="hidden" name="<?= htmlentities($name); ?>"
2323
value="<?= htmlentities($value); ?>"/>
2424
<?php

themes/material/mfa/prompt-for-mfa-totp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<form layout-children="column" method="POST">
1919
<?php
2020
foreach ($this->data['formData'] as $name => $value) {
21-
?>
21+
?>
2222
<input type="hidden" name="<?= htmlentities($name); ?>"
2323
value="<?= htmlentities($value); ?>"/>
2424
<?php

www/mfa-shield.svg

Lines changed: 3 additions & 0 deletions
Loading

www/styles.2.2.1.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ p {
1717
flex-wrap: wrap;
1818
}
1919

20+
/* can't think of a time at this point where we want the buttons to wrap inside a card. */
21+
.mdl-card__actions[layout-children] {
22+
flex-wrap: nowrap;
23+
}
24+
2025
[layout-children=column] {
2126
display: flex;
2227
flex-direction: column;

0 commit comments

Comments
 (0)