Completed ui-lib conversion
authorJamie Cameron <jcameron@webmin.com>
Tue, 2 Sep 2008 00:45:45 +0000 (00:45 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 2 Sep 2008 00:45:45 +0000 (00:45 +0000)
postfix/address_rewriting.cgi
postfix/debug.cgi
postfix/general.cgi
postfix/lang/en
postfix/local_delivery.cgi
postfix/rate.cgi
postfix/resource.cgi
postfix/smtpd.cgi

index f2bc7f6..3faec73 100755 (executable)
@@ -18,7 +18,6 @@
 
 require './postfix-lib.pl';
 
-
 $access{'address_rewriting'} || &error($text{'address_rewriting_ecannot'});
 &ui_print_header(undef, $text{'address_rewriting_title'}, "");
 
@@ -26,36 +25,24 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'address_rewriting_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'address_rewriting_title'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_yesno("allow_percent_hack");
 &option_yesno("append_at_myorigin");
-print "</tr>\n";
 
-print "<tr>\n";
 &option_yesno("append_dot_mydomain");
 &option_yesno("swap_bangpath", 'help');
-print "</tr>\n";
 
-print "<tr>\n";
-&option_radios_freefield("empty_address_recipient", 20, $text{'opt_empty_recip_default'});
-print "</tr>\n";
+&option_radios_freefield("empty_address_recipient", 35, $text{'opt_empty_recip_default'});
 
-print "<tr>\n";
 &option_radios_freefield("masquerade_domains", 35, $none);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("masquerade_exceptions", 35, $none);
-print "</tr>\n";
 
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
 &ui_print_footer("", $text{'index_return'});
 
 
index 222fc74..ad014aa 100755 (executable)
@@ -26,23 +26,16 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'debug_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Start of form
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'debug_title'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_freefield("debug_peer_list", 65);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("debug_peer_level", 15);
-print "</tr>\n";
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
-print &ui_hr();
-print "<font size=\"-1\"> <p>", &text('debug_version', postfix_module_version()),
-      "</p></font>\n";
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
+
 &ui_print_footer("", $text{'index_return'});
 
index 05d73f6..8c205d6 100755 (executable)
@@ -26,139 +26,85 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts_misc.cgi method=post>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'general_title_sensible'}</b> <font size=\"-1\">".&hlink("$text{'what_is_it'}", "general_opts")."</font></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Form start
+print &ui_form_start("save_opts_misc.cgi", "post");
+print &ui_table_start($text{'general_title_sensible'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_radios_freefield("myorigin", 30, $text{'opts_myorigin_as_myhostname'},
                                         '$mydomain', $text{'opts_myorigin_as_mydomain'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("mydestination", 60, $text{'opts_mydestination_default'},
                                              '$myhostname, localhost.$mydomain, $mydomain', $text{'opts_mydestination_domainwide'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("notify_classes", 40, $default);
-print "</tr>\n";
 
-print "</table></td></tr>\n";
-print "<tr $tb><td><b>$text{'general_title_others'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+print &ui_table_end();
+print &ui_table_start($text{'general_title_others'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_radios_freefield("relayhost", 45, $text{'opts_direct'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("always_bcc", 40, $text{'opts_always_bcc_none'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("daemon_timeout", 15);
 &option_freefield("default_database_type", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("default_transport", 15);
 &option_freefield("double_bounce_sender", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("hash_queue_depth", 15);
 &option_freefield("hash_queue_names", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("hopcount_limit", 15);
 &option_radios_freefield("delay_warning_time", 15, $text{'opts_delay_warning_time_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("inet_interfaces", 40, $text{'opts_all_interfaces'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("ipc_idle", 15);
 &option_freefield("ipc_timeout", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("mail_name", 15);
 &option_freefield("mail_owner", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("mail_version", 25);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("max_idle", 15);
 &option_freefield("max_use", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("myhostname", 40, $text{'opts_myhostname_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("mydomain", 40, $text{'opts_mydomain_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("mynetworks", 60, $text{'opts_mynetworks_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_select("mynetworks_style",
               [ [ "", $text{'default'} ],
                 [ "subnet", $text{'opts_mynetworks_subnet'} ],
                 [ "class", $text{'opts_mynetworks_class'} ],
                 [ "host", $text{'opts_mynetworks_host'} ] ]);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("bounce_notice_recipient", 15, $default);
 &option_radios_freefield("2bounce_notice_recipient", 15, $default);
-print "<tr>\n";
 
-print "</tr>\n";
 &option_radios_freefield("delay_notice_recipient", 15, $default);
 &option_radios_freefield("error_notice_recipient", 15, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("queue_directory", 45);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("process_id_directory", 20);
 &option_freefield("recipient_delimiter", 20);
-print "</tr>\n";
 
 if ($postfix_version < 2.1) {
-       print "<tr>\n";
        &option_freefield("program_directory", 45);
-       print "</tr>\n";
        }
 
-print "<tr>\n";
 &option_radios_freefield("relocated_maps", 60, $text{'opts_relocated_maps_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_yesno("sun_mailtool_compatibility", 'help');
 &option_freefield("trigger_timeout", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("content_filter", 60, $text{'opts_content_filter_default'});
-print "</tr>\n";
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
 
 &ui_print_footer("", $text{'index_return'});
index 64a77f0..0648273 100644 (file)
@@ -178,7 +178,7 @@ new_aliasmsg=Click this button to create a new alias
 
 
 local_delivery_ecannot=You are not allowed to edit local delivery options
-local_delivery_title=Local delivery
+local_delivery_title=Local Delivery
 opts_local_transport=Name of the transport for local deliveries
 opts_local_transport_local=Local
 opts_local_command_shell=Shell to use for delivery to external command
@@ -204,7 +204,7 @@ opts_prepend_delivered_header=Prepend a <tt>Delivered-To:</tt> when...
 opts_prepend_delivered_header_default=Default
 
 
-resource_title=General resource control
+resource_title=General Resource Control
 resource_ecannot=You are not allowed to edit resource control parameters
 opts_bounce_size_limit=Max size of bounced message
 opts_command_time_limit=Max time for delivery to external commands
index ec11928..bc8794c 100755 (executable)
@@ -26,74 +26,43 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'local_delivery_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Start of form
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'local_delivery_title'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_radios_freefield("local_transport", 30, $text{'opts_local_transport_local'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("local_command_shell", 40, $text{'opts_local_command_shell_direct'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("forward_path", 80);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("allow_mail_to_commands", 40);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("allow_mail_to_files", 40);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("default_privs", 25);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("home_mailbox", 40, $text{'opts_home_mailbox_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("luser_relay", 40, $text{'opts_luser_relay_none'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("mail_spool_directory", 40);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("mailbox_command", 60, $text{'opts_mailbox_command_none'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("mailbox_transport", 40, $text{'opts_mailbox_transport_none'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("fallback_transport", 40, $text{'opts_fallback_transport_none'});
-print "</tr>\n";
 
-print "<tr>\n";
-&option_freefield("local_destination_concurrency_limit", 40);
-print "</tr>\n";
+&option_freefield("local_destination_concurrency_limit", 6);
 
-print "<tr>\n";
 &option_radios_freefield("local_destination_recipient_limit", 40, $text{'opts_local_destination_recipient_limit_default'});
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("prepend_delivered_header", 40, $text{'opts_prepend_delivered_header_default'});
-print "</tr>\n";
 
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
 &ui_print_footer("", $text{'index_return'});
 
 
index 9c0751f..cdecc35 100755 (executable)
@@ -26,34 +26,25 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'rate_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Form start
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'rate_title'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_freefield("default_destination_concurrency_limit", 15);
 &option_freefield("default_destination_recipient_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("initial_destination_concurrency", 15);
 &option_freefield("maximal_queue_lifetime", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("minimal_backoff_time", 15);
 &option_freefield("maximal_backoff_time", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("queue_run_delay", 15);
 &option_freefield("defer_transports", 15);
-print "</tr>\n";
 
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
 &ui_print_footer("", $text{'index_return'});
 
 
index 0dc97ef..ce1e423 100755 (executable)
@@ -26,58 +26,39 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'resource_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Form start
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'resource_title'}, "width=100%", 4);
 
-print "<tr>\n";
 &option_freefield("bounce_size_limit", 15);
 &option_freefield("command_time_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("default_process_limit", 15);
 &option_freefield("duplicate_filter_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("deliver_lock_attempts", 15);
 &option_freefield("deliver_lock_delay", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("fork_attempts", 15);
 &option_freefield("fork_delay", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("header_size_limit", 15);
 &option_freefield("line_length_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("message_size_limit", 15);
 &option_freefield("qmgr_message_active_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("qmgr_message_recipient_limit", 15);
 &option_freefield("queue_minfree", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("stale_lock_time", 15);
 &option_freefield("transport_retry_time", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("mailbox_size_limit", 15);
-print "</tr>\n";
 
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
 
-print "</table></td></tr></table><p>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
 &ui_print_footer("", $text{'index_return'});
 
 
index 445cc94..1e0d445 100755 (executable)
@@ -25,77 +25,48 @@ $default = $text{'opts_default'};
 $none = $text{'opts_none'};
 $no_ = $text{'opts_no'};
 
-print "<form action=save_opts.cgi>\n";
-print "<table border width=100%>\n";
-print "<tr $tb> <td><b>$text{'smtpd_title'}</b></td></tr>\n";
-print "<tr $cb> <td><table width=100%>\n";
+# Form start
+print &ui_form_start("save_opts.cgi");
+print &ui_table_start($text{'smtpd_title'}, "width=100%", 4);
 
-print "<tr>\n";
-&option_radios_freefield("smtpd_banner", 85, $default);
-print "</tr>\n";
+&option_radios_freefield("smtpd_banner", 65, $default);
 
-
-print "<tr>\n";
 &option_freefield("smtpd_recipient_limit", 15);
 &option_yesno("disable_vrfy_command", 'help');
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("smtpd_timeout", 15);
 &option_freefield("smtpd_error_sleep_time", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("smtpd_soft_error_limit", 15);
 &option_freefield("smtpd_hard_error_limit", 15);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_yesno("smtpd_helo_required", 'help');
 &option_yesno("allow_untrusted_routing", 'help');
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("smtpd_etrn_restrictions", 65, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("smtpd_helo_restrictions", 65, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("smtpd_sender_restrictions", 65, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("smtpd_recipient_restrictions", 65, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_radios_freefield("relay_domains", 65, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("access_map_reject_code", 15, $default);
 &option_freefield("invalid_hostname_reject_code", 15, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("maps_rbl_reject_code", 15, $default);
 &option_freefield("reject_code", 15, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("relay_domains_reject_code", 15, $default);
 &option_freefield("unknown_address_reject_code", 15, $default);
-print "</tr>\n";
 
-print "<tr>\n";
 &option_freefield("unknown_client_reject_code", 15, $default);
 &option_freefield("unknown_hostname_reject_code", 15, $default);
-print "</tr>\n";
 
-print "</table></td></tr></table>\n";
-print "<input type=submit value=\"$text{'opts_save'}\"></form>\n";
+print &ui_table_end();
+print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
+
 &ui_print_footer("", $text{'index_return'});