diff --git a/postfix/bcc.cgi b/postfix/bcc.cgi index d452b61c0..257fe72b4 100755 --- a/postfix/bcc.cgi +++ b/postfix/bcc.cgi @@ -6,25 +6,18 @@ $access{'bcc'} || &error($text{'bcc_ecannot'}); &ui_print_header(undef, $text{'bcc_title'}, "", "bcc"); &ReadParse(); -# alias general options +# Start of BCC form +print &ui_form_start("save_opts_bcc.cgi"); +print &ui_table_start($text{'bcc_title'}, "width=100%", 2); -print "
\n"; -print "\n"; -print "\n"; -print "
$text{'bcc_title'}
\n"; - -print "\n"; &option_mapfield("sender_bcc_maps", 60); -print "\n"; -print "\n"; &option_mapfield("recipient_bcc_maps", 60); -print "\n"; -print "

\n"; -print "

\n"; -print "

\n"; +print &ui_table_end(); +print &ui_form_end([ [ undef, $text{'opts_save'} ] ]); + +# Map contents print &ui_hr(); - print &ui_tabs_start([ [ "sender", $text{'bcc_sender'} ], [ "recipient", $text{'bcc_recipient'} ] ], "mode", $in{'mode'} || 'sender', 1); @@ -34,12 +27,12 @@ print &ui_tabs_start_tab("mode", "sender"); print $text{'bcc_senderdesc'},"

\n"; if (&get_current_value("sender_bcc_maps") eq "") { - print ($text{'no_map'}."

"); + print $text{'no_map'},"

\n"; } else { &generate_map_edit("sender_bcc_maps", $text{'map_click'}." ". - "".&hlink("$text{'help_map_format'}", "virtual")."\n
\n"); + &hlink($text{'help_map_format'}, "virtual")); } print &ui_tabs_end_tab("mode", "sender"); @@ -48,12 +41,12 @@ print &ui_tabs_start_tab("mode", "recipient"); print $text{'bcc_recipientdesc'},"

\n"; if (&get_current_value("recipient_bcc_maps") eq "") { - print ($text{'no_map'}."

"); + print $text{'no_map'},"

\n"; } else { &generate_map_edit("recipient_bcc_maps", $text{'map_click'}." ". - "".&hlink("$text{'help_map_format'}", "virtual")."\n
\n"); + &hlink($text{'help_map_format'}, "virtual")); } print &ui_tabs_end_tab("mode", "recipient"); diff --git a/postfix/postfix-lib.pl b/postfix/postfix-lib.pl index a6cd407e0..6d80b7fe5 100644 --- a/postfix/postfix-lib.pl +++ b/postfix/postfix-lib.pl @@ -369,10 +369,9 @@ sub option_freefield my $v = &get_current_value($name); my $key = 'opts_'.$name; - printf "".&hlink("$text{$key}", "opt_".$name)." \n", - $length > 20 ? "colspan=3" : ""; - - print &ui_textbox($name."_def", $v, $length),"\n"; + print &ui_table_row(&hlink($text{$key}, "opt_".$name), + &ui_textbox($name."_def", $v, $length), + $length > 20 ? 3 : 1); } @@ -384,14 +383,11 @@ sub option_yesno my $v = &get_current_value($name); my $key = 'opts_'.$name; - defined($_[1]) ? - print "".&hlink("$text{$key}", "opt_".$name)." \n" - : - print "$text{$key} \n"; - - print &ui_radio($name."_def", lc($v), - [ [ "yes", $text{'yes'} ], [ "no", $text{'no'} ] ]); - print "\n"; + print &ui_table_row(defined($_[1]) ? &hlink($text{$key}, "opt_".$name) + : $text{$key}, + &ui_radio($name."_def", lc($v), + [ [ "yes", $text{'yes'} ], + [ "no", $text{'no'} ] ])); } # option_select(name_of_option, &options, [help]) diff --git a/postfix/sasl.cgi b/postfix/sasl.cgi index 3619ce1e8..ad069150b 100755 --- a/postfix/sasl.cgi +++ b/postfix/sasl.cgi @@ -10,65 +10,48 @@ $default = $text{'opts_default'}; $none = $text{'opts_none'}; $no_ = $text{'opts_no'}; -print "

\n"; -print "\n"; -print "\n"; -print "
$text{'sasl_title'}
\n"; +# Form start +print &ui_form_start("save_sasl.cgi"); +print &ui_table_start($text{'sasl_title'}, "width=100%", 4); # Enabled, accept broken clients -print "\n"; &option_yesno("smtpd_sasl_auth_enable"); &option_yesno("broken_sasl_auth_clients"); -print "\n"; # Anonymous and plain-text options -print "\n"; %opts = map { $_, 1 } split(/[\s,]+/, &get_current_value("smtpd_sasl_security_options")); -print "\n"; +print &ui_table_row($text{'sasl_opts'}, join("
\n", @cbs), 3); # SASL-related relay restrictions %recip = map { $_, 1 } split(/[\s,]+/, &get_current_value("smtpd_recipient_restrictions")); -print "\n"; +print &ui_table_row($text{'sasl_recip'}, join("
\n", @cbs), 3); # Delay bad logins -print "\n"; &option_yesno("smtpd_delay_reject"); -print "\n"; -print "\n"; +print &ui_table_hr(); # SMTP TLS options -print "\n"; &option_yesno("smtpd_use_tls"); -print "\n"; -print "\n"; &option_radios_freefield("smtpd_tls_cert_file", 60, $none); -print "\n"; -print "\n"; &option_radios_freefield("smtpd_tls_key_file", 60, $none); -print "\n"; -print "\n"; &option_radios_freefield("smtpd_tls_CAfile", 60, $none); -print "\n"; -print "
","$text{'sasl_opts'}", - " \n"; +@cbs = ( ); foreach $o ("noanonymous", "noplaintext") { - print &ui_checkbox("sasl_opts", $o, $text{'sasl_'.$o}, $opts{$o}), - "
\n"; + push(@cbs, &ui_checkbox("sasl_opts", $o, $text{'sasl_'.$o}, $opts{$o})); } -print "
","$text{'sasl_recip'}", - " \n"; +@cbs = ( ); foreach $o (&list_smtpd_restrictions()) { - print &ui_checkbox("sasl_recip", $o, $text{'sasl_'.$o}, $recip{$o}), - "
\n"; + push(@cbs, &ui_checkbox("sasl_recip", $o, $text{'sasl_'.$o}, + $recip{$o})); } -print "

\n"; -print "

\n"; +print &ui_table_end(); +print &ui_form_end([ [ undef, $text{'opts_save'} ] ]); &ui_print_footer("", $text{'index_return'}); diff --git a/postfix/smtp.cgi b/postfix/smtp.cgi index 534c6eb23..a1a64d547 100755 --- a/postfix/smtp.cgi +++ b/postfix/smtp.cgi @@ -26,60 +26,38 @@ $default = $text{'opts_default'}; $none = $text{'opts_none'}; $no_ = $text{'opts_no'}; -print "
\n"; -print "\n"; -print "\n"; -print "
$text{'smtpd_title'}
\n"; +# Start of form +print &ui_form_start("save_opts.cgi"); +print &ui_table_start($text{'smtpd_title'}, "width=100%", 4); -print "\n"; &option_radios_freefield("best_mx_transport", 25, $text{'opts_best_mx_transport_default'}); -print "\n"; -print "\n"; &option_radios_freefield("fallback_relay", 60, $default); -print "\n"; -print "\n"; &option_yesno("ignore_mx_lookup_error", 'help'); &option_yesno("smtp_skip_4xx_greeting", 'help'); -print "\n"; -print "\n"; &option_yesno("smtp_skip_quit_response", 'help'); -print "\n"; -print "\n"; &option_radios_freefield("smtp_destination_concurrency_limit", 15, $default); -print "\n"; -print "\n"; &option_radios_freefield("smtp_destination_recipient_limit", 15, $default); -print "\n"; -print "\n"; &option_freefield("smtp_connect_timeout", 15); &option_freefield("smtp_helo_timeout", 15); -print "\n"; -print "\n"; &option_freefield("smtp_mail_timeout", 15); &option_freefield("smtp_rcpt_timeout", 15); -print "\n"; -print "\n"; &option_freefield("smtp_data_init_timeout", 15); &option_freefield("smtp_data_xfer_timeout", 15); -print "\n"; -print "\n"; &option_freefield("smtp_data_done_timeout", 15); &option_freefield("smtp_quit_timeout", 15); -print "\n"; +print &ui_table_end(); +print &ui_form_end([ [ undef, $text{'opts_save'} ] ]); - -print "

\n"; -print "

\n"; &ui_print_footer("", $text{'index_return'});