mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Fix to prevent forcing using tables in tabs
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -526,4 +526,28 @@ body > .mode > b:has(i.ff-usermin) > .ff-usermin {
|
||||
body > .mode > b:has(i.ff-cloudmin),
|
||||
body > .mode > b:has(i.ff-cloudmin) > .ff-cloudmin {
|
||||
color: #cb6d2f;
|
||||
}
|
||||
|
||||
/* ui_div_row */
|
||||
.ui_div_row {
|
||||
margin: 4px 0;
|
||||
}
|
||||
.ui_div_row + .ui_div_row {
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
.ui_div_row span:first-child {
|
||||
width: 100px;
|
||||
min-width: 10%;
|
||||
max-width: 15%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding-top: 4px;
|
||||
text-align: right;
|
||||
padding-right: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui_div_row span:last-child {
|
||||
padding-top: 4px;
|
||||
display: inline-block;
|
||||
max-width: 80%;
|
||||
}
|
@ -353,13 +353,13 @@ print &ui_hidden("charset", $main::force_charset);
|
||||
# Start tabs for from / to / cc / bcc
|
||||
# Subject is separate
|
||||
print &ui_table_start($text{'reply_headers'}, "width=100%", 2);
|
||||
@tds = ( "width=10%", "width=90% nowrap" );
|
||||
print "<tbody><tr><td>";
|
||||
@tabs = ( [ "from", $text{'reply_tabfrom'} ],
|
||||
[ "to", $text{'reply_tabto'} ],
|
||||
[ "cc", $text{'reply_tabcc'} ],
|
||||
[ "bcc", $text{'reply_tabbcc'} ],
|
||||
[ "options", $text{'reply_taboptions'} ] );
|
||||
print &ui_table_row(undef, &ui_tabs_start(\@tabs, "tab", "to", 0), 2);
|
||||
print &ui_tabs_start(\@tabs, "tab", "to", 0);
|
||||
|
||||
# From address tab
|
||||
$from ||= &get_user_from_address(\@uinfo);
|
||||
@ -391,45 +391,43 @@ elsif ($access{'fmode'} == 3) {
|
||||
$frominput = "<tt>$ouser\@$access{'from'}</tt>".
|
||||
&ui_hidden("from", "$ouser\@$access{'from'}");
|
||||
}
|
||||
print &ui_tabs_start_tabletab("tab", "from");
|
||||
print &ui_table_row($text{'mail_from'}, $frominput, 1, \@tds);
|
||||
print &ui_tabs_end_tabletab();
|
||||
print &ui_tabs_start_tab("tab", "from");
|
||||
print &ui_div_row($text{'mail_from'}, $frominput);
|
||||
print &ui_tabs_end_tab();
|
||||
|
||||
# Show To: field
|
||||
print &ui_tabs_start_tabletab("tab", "to");
|
||||
print &ui_table_row($text{'mail_to'}, &ui_address_field("to", $to, 0, 1),
|
||||
1, \@tds);
|
||||
print &ui_tabs_end_tabletab();
|
||||
print &ui_tabs_start_tab("tab", "to");
|
||||
print &ui_div_row($text{'mail_to'}, &ui_address_field("to", $to, 0, 1));
|
||||
print &ui_tabs_end_tab();
|
||||
|
||||
# Show Cc: field
|
||||
print &ui_tabs_start_tabletab("tab", "cc");
|
||||
print &ui_table_row($text{'mail_cc'}, &ui_address_field("cc", $cc, 0, 1),
|
||||
1, \@tds);
|
||||
print &ui_tabs_end_tabletab();
|
||||
print &ui_tabs_start_tab("tab", "cc");
|
||||
print &ui_div_row($text{'mail_cc'}, &ui_address_field("cc", $cc, 0, 1));
|
||||
print &ui_tabs_end_tab();
|
||||
|
||||
# Show Bcc: field
|
||||
$bcc ||= $config{'bcc_to'};
|
||||
print &ui_tabs_start_tabletab("tab", "bcc");
|
||||
print &ui_table_row($text{'mail_bcc'}, &ui_address_field("bcc", $bcc, 0, 1),
|
||||
1, \@tds);
|
||||
print &ui_tabs_end_tabletab();
|
||||
print &ui_tabs_start_tab("tab", "bcc");
|
||||
print &ui_div_row($text{'mail_bcc'}, &ui_address_field("bcc", $bcc, 0, 1));
|
||||
print &ui_tabs_end_tab();
|
||||
|
||||
# Show tab for options
|
||||
print &ui_tabs_start_tabletab("tab", "options");
|
||||
print &ui_table_row($text{'mail_pri'},
|
||||
print &ui_tabs_start_tab("tab", "options");
|
||||
print &ui_div_row($text{'mail_pri'},
|
||||
&ui_select("pri", "",
|
||||
[ [ 1, $text{'mail_highest'} ],
|
||||
[ 2, $text{'mail_high'} ],
|
||||
[ "", $text{'mail_normal'} ],
|
||||
[ 4, $text{'mail_low'} ],
|
||||
[ 5, $text{'mail_lowest'} ] ]), 1, \@tds);
|
||||
print &ui_tabs_end_tabletab();
|
||||
[ 5, $text{'mail_lowest'} ] ]));
|
||||
print &ui_tabs_end_tab();
|
||||
print &ui_tabs_end();
|
||||
|
||||
# Subject field, outside tabs
|
||||
print &ui_table_row($text{'mail_subject'},
|
||||
print &ui_div_row($text{'mail_subject'},
|
||||
&ui_textbox("subject", $subject, 40, 0, undef,
|
||||
"style='width:95%'"), 1, \@tds);
|
||||
"style='width:95%'"));
|
||||
print "</td></tr></tbody>";
|
||||
print &ui_table_end();
|
||||
|
||||
# Create link for switching to HTML/text mode for new mail
|
||||
|
16
ui-lib.pl
16
ui-lib.pl
@ -2755,6 +2755,22 @@ $rv .= "</details>";
|
||||
return $rv;
|
||||
}
|
||||
|
||||
=head2 ui_div_row(label, content)
|
||||
|
||||
Prints a row without using a table and
|
||||
places label and content in a way
|
||||
ui_table_row does
|
||||
|
||||
=cut
|
||||
sub ui_div_row
|
||||
{
|
||||
if (defined(&theme_ui_div_row)) {
|
||||
return &theme_ui_div_row(@_);
|
||||
}
|
||||
my ($label, $content) = @_;
|
||||
return "<div class='ui_div_row'><span>$label</span><span>$content</span></div>";
|
||||
}
|
||||
|
||||
=head2 ui_hide_outside_of_viewport(elem)
|
||||
|
||||
Prints element if not in viewport. Useful
|
||||
|
Reference in New Issue
Block a user