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

Commit 828003c

Browse files
author
Billy Clark
committed
module-mfa became more consistent in its use of form methods.
1 parent bbde1ce commit 828003c

File tree

6 files changed

+7
-46
lines changed

6 files changed

+7
-46
lines changed

themes/material/mfa/must-set-up-mfa.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
</div>
1616
</header>
1717
<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-
?>
18+
<form layout-children="column" method="post">
2719
<div class="mdl-card mdl-shadow--8dp">
2820
<div class="mdl-card__media white-bg margin" layout-children="column">
2921
<img src="mfa-shield.svg" alt="<?= $this->t('{material:mfa:shield_icon}') ?>">

themes/material/mfa/nag-for-mfa.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
</div>
1616
</header>
1717
<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-
?>
18+
<form layout-children="column" method="post">
2719
<div class="mdl-card mdl-shadow--8dp">
2820
<div class="mdl-card__media white-bg margin" layout-children="column">
2921
<img src="mfa-shield.svg" alt="<?= $this->t('{material:mfa:shield_icon}') ?>">

themes/material/mfa/other_mfas.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ul class="mdl-menu mdl-js-menu mdl-menu--top-left" data-mdl-for="others">
88
<?php
99
$mfaOptions = $this->data['mfaOptions'];
10-
$currentMfaId = $this->data['formData']['mfaId'];
10+
$currentMfaId = filter_input(INPUT_GET, 'mfaId');
1111

1212
function excludeSelf($others, $selfId) {
1313
return array_filter($others, function($option) use ($selfId) {

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
</div>
1616
</header>
1717
<main class="mdl-layout__content" layout-children="column">
18-
<form layout-children="column" method="POST">
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-
?>
18+
<form layout-children="column" method="post">
2719
<div class="mdl-card mdl-shadow--8dp">
2820
<div class="mdl-card__media white-bg margin" layout-children="column">
2921
<img src="mfa-backupcode.svg"
@@ -49,6 +41,7 @@
4941
</label>
5042
<input name="mfaSubmission" class="mdl-textfield__input" autofocus
5143
id="mfaSubmission"/>
44+
<!-- TODO: don't remember codes here since they are one-time use anyway-->
5245
</div>
5346
</div>
5447

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
</div>
1616
</header>
1717
<main class="mdl-layout__content" layout-children="column">
18-
<form layout-children="column" method="POST">
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-
?>
18+
<form layout-children="column" method="post">
2719
<div class="mdl-card mdl-shadow--8dp">
2820
<div class="mdl-card__media white-bg margin" layout-children="column">
2921
<img src="mfa-totp.svg" alt="<?= $this->t('{material:mfa:totp_icon}') ?>">

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,7 @@ function createHiddenInput(name) {
7676
</header>
7777

7878
<main class="mdl-layout__content" layout-children="column">
79-
<form layout-children="column" method="POST">
80-
<?php
81-
foreach ($this->data['formData'] as $name => $value) {
82-
?>
83-
<input type="hidden" name="<?= htmlentities($name); ?>"
84-
value="<?= htmlentities($value); ?>"/>
85-
<?php
86-
}
87-
?>
79+
<form layout-children="column" method="post">
8880
<div class="mdl-card mdl-shadow--8dp">
8981
<div class="mdl-card__media white-bg margin" layout-children="column">
9082
<img src="mfa-u2f.png" alt="<?= $this->t('{material:mfa:u2f_icon}') ?>">

0 commit comments

Comments
 (0)