mirror of
https://github.com/webmin/webmin.git
synced 2026-03-02 01:02:59 +00:00
Fix to show post-save message about 2FA
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/no-qr-code-displayed-when-selectinc-totp/136703/5
This commit is contained in:
@@ -32,7 +32,8 @@ $miniserv{'twofactor_provider'} = $in{'twofactor_provider'};
|
||||
&put_miniserv_config(\%miniserv);
|
||||
&unlock_file($ENV{'MINISERV_CONFIG'});
|
||||
|
||||
$msg = $text{'restart_done'}."<p>\n";
|
||||
$msg = "";
|
||||
$msg .= $text{'restart_done'}."<p>\n" if ($gconfig{'restart_async'});
|
||||
if ($in{'twofactor_provider'}) {
|
||||
$msg .= &text('twofactor_enrolllink',
|
||||
"../acl/twofactor_form.cgi")."<p>\n";
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
require './webmin-lib.pl';
|
||||
|
||||
&show_restart_page($text{'blocked_title'}, $text{'blocked_restarting'});
|
||||
&show_restart_page($text{'blocked_title'},
|
||||
$gconfig{'restart_async'}
|
||||
? $text{'blocked_restarting'}
|
||||
: undef);
|
||||
|
||||
|
||||
|
||||
@@ -82,6 +82,10 @@ for(my $i=0; $i<@wlinks; $i++) {
|
||||
$i--;
|
||||
}
|
||||
}
|
||||
|
||||
print &ui_alert_box(&filter_javascript($in{'message'}), 'success', undef, 1,
|
||||
&html_escape($in{'title'})) if ($in{'message'});
|
||||
|
||||
&icons_table(\@wlinks, \@wtitles, \@wicons);
|
||||
|
||||
print &ui_hr();
|
||||
|
||||
@@ -994,7 +994,7 @@ cache_enone=None selected
|
||||
cache_efile=Invalid filename
|
||||
|
||||
restart_title=Restarting Webmin
|
||||
restart_done=The Webmin server process is now restarting - please wait for a few seconds before continuing.
|
||||
restart_done=The Webmin server process is restarting. Please wait a few seconds before continuing.
|
||||
|
||||
mobile_title=Mobile Device Options
|
||||
mobile_header=Options for mobile browsers
|
||||
@@ -1015,7 +1015,7 @@ blocked_user=Webmin user
|
||||
blocked_host=Client host
|
||||
blocked_clear=Clear All Blocks
|
||||
blocked_cleardesc=Click this button to clear all current host and user blocks, by restarting the Webmin server process.
|
||||
blocked_restarting=The Webmin server process is now restarting to clear blocked hosts and users - please wait for a few seconds before continuing.
|
||||
blocked_restarting=The Webmin server process is restarting to clear blocked hosts and users. Please wait a few seconds before continuing.
|
||||
|
||||
refreshmods_title=Refresh Modules
|
||||
refreshmods_installed=Checking for usable Webmin modules ..
|
||||
|
||||
@@ -1954,12 +1954,14 @@ Output a page with header and footer about Webmin needing to restart.
|
||||
=cut
|
||||
sub show_restart_page
|
||||
{
|
||||
my ($title, $msg) = @_;
|
||||
if (!$gconfig{'restart_async'}) {
|
||||
&restart_miniserv();
|
||||
&redirect("");
|
||||
my $msg_redir = "";
|
||||
$msg_redir = "?title=".&urlize($title)."&message=".&urlize($msg) if $msg;
|
||||
&redirect($msg_redir);
|
||||
return;
|
||||
}
|
||||
my ($title, $msg) = @_;
|
||||
$title ||= $text{'restart_title'};
|
||||
$msg ||= $text{'restart_done'};
|
||||
&ui_print_header(undef, $title, "");
|
||||
|
||||
Reference in New Issue
Block a user