Better name for twofactor configuration endpoint
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
c7e0782201
commit
e0ac6c888d
@ -34,7 +34,7 @@ $content = PhpMyAdmin\Util::getHtmlTab(
|
||||
/* Second authentication factor */
|
||||
$content .= PhpMyAdmin\Util::getHtmlTab(
|
||||
array(
|
||||
'link' => 'prefs_second.php',
|
||||
'link' => 'prefs_twofactor.php',
|
||||
'text' => __('Two-factor authentication')
|
||||
)
|
||||
) . "\n";
|
||||
|
||||
@ -20,7 +20,7 @@ $two_factor = new TwoFactor($GLOBALS['cfg']['Server']['user']);
|
||||
|
||||
if (isset($_POST['2fa_remove'])) {
|
||||
if (! $two_factor->check(true)) {
|
||||
echo Template::get('prefs_second_confirm')->render([
|
||||
echo Template::get('prefs_twofactor_confirm')->render([
|
||||
'form' => $two_factor->render(),
|
||||
]);
|
||||
exit;
|
||||
@ -30,7 +30,7 @@ if (isset($_POST['2fa_remove'])) {
|
||||
}
|
||||
} elseif (isset($_POST['2fa_configure'])) {
|
||||
if (! $two_factor->configure($_POST['2fa_configure'])) {
|
||||
echo Template::get('prefs_second_configure')->render([
|
||||
echo Template::get('prefs_twofactor_configure')->render([
|
||||
'form' => $two_factor->setup(),
|
||||
'configure' => $_POST['2fa_configure'],
|
||||
]);
|
||||
@ -41,7 +41,7 @@ if (isset($_POST['2fa_remove'])) {
|
||||
}
|
||||
|
||||
$backend = $two_factor->backend;
|
||||
echo Template::get('prefs_second')->render([
|
||||
echo Template::get('prefs_twofactor')->render([
|
||||
'enabled' => $two_factor->writable,
|
||||
'num_backends' => count($two_factor->available),
|
||||
'backend_id' => $backend::$id,
|
||||
@ -26,7 +26,7 @@
|
||||
<div class="group-cnt">
|
||||
<p>{% trans "You have enabled two factor authentication." %}</p>
|
||||
<p>{{ backend_description }}</p>
|
||||
<form method="POST" action="prefs_second.php">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
<input type="submit" name="2fa_remove" value="{% trans "Disable two-factor authentication" %}" />
|
||||
</form>
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="group">
|
||||
<h2>{% trans "Configure two-factor authentication" %}</h2>
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_second.php">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{% for backend in backends %}
|
||||
<label>
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="group">
|
||||
<h2>{% trans "Configure two-factor authentication" %}</h2>
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_second.php">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Url_getHiddenInputs() }}
|
||||
<input type="hidden" name="2fa_configure" value="{{ configure }}" />
|
||||
{{ form|raw }}
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="group">
|
||||
<h2>{% trans "Confirm disabling two-factor authentication" %}</h2>
|
||||
<div class="group-cnt">
|
||||
<form method="POST" action="prefs_second.php">
|
||||
<form method="POST" action="prefs_twofactor.php">
|
||||
{{ Message_notice("By disabling two factor authentication you will be again able to login using password only."|trans) }}
|
||||
{{ Url_getHiddenInputs() }}
|
||||
{{ form|raw }}
|
||||
Loading…
Reference in New Issue
Block a user