mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Fix UI collapse support options (including open on start) a766a348f0 (commitcomment-44636896)
This commit is contained in:
@ -82,7 +82,10 @@ if ($r == 0) {
|
||||
print &ui_alert_box($text{'index_notrun'}, 'danger');
|
||||
|
||||
if ($rout) {
|
||||
print &ui_details($text{'syslog_desc2'}, &text('index_emsg', "<tt>$rout</tt>"), 'error');
|
||||
print &ui_details({
|
||||
'title' => $text{'syslog_desc2'},
|
||||
'content' => &text('index_emsg',"<tt>$rout</tt>"),
|
||||
'class' =>'error'});
|
||||
}
|
||||
|
||||
if ($access{'stop'} && &is_mysql_local()) {
|
||||
@ -102,8 +105,12 @@ elsif ($r == -1) {
|
||||
print &ui_alert_box($text{'index_nopass'}, 'warn');
|
||||
|
||||
if ($rout) {
|
||||
print &ui_details($text{'syslog_desc2'}, &text('index_emsg', "<tt>$rout</tt>"), 'error') . "<br>";
|
||||
}
|
||||
print &ui_details({
|
||||
'title' => $text{'syslog_desc2'},
|
||||
'content' => &text('index_emsg',"<tt>$rout</tt>"),
|
||||
'class' => 'error',
|
||||
'open' => 'open'}) . "<br>";
|
||||
}
|
||||
|
||||
print &ui_form_start("login.cgi", "post");
|
||||
print &ui_table_start($text{'index_ltitle'}, undef, 2);
|
||||
|
11
ui-lib.pl
11
ui-lib.pl
@ -2731,15 +2731,16 @@ the widget is toggled into an "open" state.
|
||||
=cut
|
||||
sub ui_details
|
||||
{
|
||||
my ($title, $content, $class) = @_;
|
||||
my ($c) = @_;
|
||||
if (defined(&theme_ui_details)) {
|
||||
return &theme_ui_details(@_);
|
||||
}
|
||||
|
||||
my $rv;
|
||||
$class = " class=\"$class\"" if($class);
|
||||
$rv = "<details$class>";
|
||||
$rv .= "<summary>$title</summary>";
|
||||
$rv .= "$content";
|
||||
$c->{'class'} = "class=\"$c->{'class'}\"" if($c->{'class'});
|
||||
$rv = "<details $c->{'class'} $c->{'open'}>";
|
||||
$rv .= "<summary>$c->{'title'}</summary>";
|
||||
$rv .= "$c->{'content'}";
|
||||
$rv .= "</details>";
|
||||
return $rv;
|
||||
}
|
||||
|
Reference in New Issue
Block a user