mirror of
https://github.com/webmin/webmin.git
synced 2026-09-19 12:00:46 +01:00
Canonical table ui-lib conversion
This commit is contained in:
@@ -22,45 +22,28 @@ require './postfix-lib.pl';
|
||||
$access{'canonical'} || &error($text{'canonical_ecannot'});
|
||||
&ui_print_header(undef, $text{'canonical_title'}, "", "canonical");
|
||||
|
||||
|
||||
|
||||
# alias general options
|
||||
|
||||
print "<form action=save_opts_canonical.cgi>\n";
|
||||
print "<table border width=100%>\n";
|
||||
print "<tr $tb> <td><b>$text{'canonical_title'}</b></td></tr>\n";
|
||||
print "<tr $cb> <td><table width=100%>\n";
|
||||
# Start of canonical maps form
|
||||
print &ui_form_start("save_opts_canonical.cgi");
|
||||
print &ui_table_start($text{'canonical_title'}, "width=100%", 2);
|
||||
|
||||
$none = $text{'opts_none'};
|
||||
|
||||
print "<tr>\n";
|
||||
&option_mapfield("canonical_maps", 60, $none);
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr>\n";
|
||||
&option_mapfield("recipient_canonical_maps", 60, $none);
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr>\n";
|
||||
&option_mapfield("sender_canonical_maps", 60, $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";
|
||||
# Buttons to edit the three map types
|
||||
print &ui_hr();
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
print "<table cellpadding=5 width=100%><tr><td>\n";
|
||||
print "<form action=canonical_edit.cgi>\n";
|
||||
print "$text{'edit_canonical_maps_general'}:</td></tr><tr><td>\n";
|
||||
print "<input type=submit name=which1 value=\"$text{'edit_canonical_maps'}\">\n";
|
||||
print "<input type=submit name=which2 value=\"$text{'edit_recipient_canonical_maps'}\">\n";
|
||||
print "<input type=submit name=which3 value=\"$text{'edit_sender_canonical_maps'}\">\n";
|
||||
print "</td></tr></table></form>\n";
|
||||
|
||||
|
||||
print &ui_form_start("canonical_edit.cgi");
|
||||
print "$text{'edit_canonical_maps_general'}<p>\n";
|
||||
print &ui_submit($text{'edit_canonical_maps'}, "which1");
|
||||
print &ui_submit($text{'edit_recipient_canonical_maps'}, "which2");
|
||||
print &ui_submit($text{'edit_sender_canonical_maps'}, "which3");
|
||||
print &ui_form_end();
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
@@ -21,7 +21,7 @@ require './postfix-lib.pl';
|
||||
|
||||
|
||||
my $first_line = $text{'map_click'}." ".
|
||||
"<font size=\"-1\">".&hlink("$text{'help_map_format'}", "canonical")."</font>\n<br>\n";
|
||||
&hlink($text{'help_map_format'}, "canonical");
|
||||
|
||||
if ($in{'which1'})
|
||||
{
|
||||
|
||||
@@ -339,13 +339,13 @@ opts_ldap_server_host=LDAP server hostname
|
||||
canonical_title=Canonical Mapping
|
||||
canonical_ecannot=You are not allowed to edit the canonical mapping configuration
|
||||
opts_canonical_maps=Address mapping lookup tables
|
||||
opts_recipient_canonical_maps=Tables for RECIPIENT addresses
|
||||
opts_sender_canonical_maps=Tables for SENDER addresses
|
||||
edit_canonical_maps=Edit canonical maps
|
||||
edit_recipient_canonical_maps=Edit recipient canonical maps
|
||||
edit_sender_canonical_maps=Edit sender canonical maps
|
||||
edit_canonical_maps_general=Click on one of these buttons to edit the canonical maps
|
||||
canonical_edit_title=Edit A Canonical Map
|
||||
opts_recipient_canonical_maps=Tables for recipient addresses
|
||||
opts_sender_canonical_maps=Tables for sender addresses
|
||||
edit_canonical_maps=Edit Canonical Maps
|
||||
edit_recipient_canonical_maps=Edit Recipient Canonical Maps
|
||||
edit_sender_canonical_maps=Edit Sender Canonical Maps
|
||||
edit_canonical_maps_general=Click on one of these buttons to edit the canonical maps ..
|
||||
canonical_edit_title=Edit Canonical Map
|
||||
canonical_return_sender=sender canonical maps
|
||||
canonical_return_recipient=recipient canonical maps
|
||||
canonical_return=canonical maps
|
||||
@@ -361,7 +361,7 @@ new_manual=Edit Map Manually
|
||||
new_manualmsg=Click this button to manually edit the files from which this map is built.
|
||||
map_save=Save mapping
|
||||
delete_map=Delete mapping
|
||||
edit_map_title=Edit A Map
|
||||
edit_map_title=Edit Map
|
||||
map_save_err=Error while saving a mapping
|
||||
mapps_no_map_file=No map file defined
|
||||
map_delete_failed=Failed to delete map: $1
|
||||
@@ -372,6 +372,7 @@ help_map_format=What format should I use?
|
||||
map_noname=Missing or invalid mapping name
|
||||
map_cannot=This map cannot be edited : $1
|
||||
map_unknown=Webmin does not support the map type $1
|
||||
mapping_none=No mappings of this type have been defined yet.
|
||||
|
||||
virtual_title=Virtual Domains
|
||||
virtual_ecannot=You are not allowed to edit the virtual domains mapping configuration
|
||||
|
||||
@@ -858,6 +858,9 @@ sub generate_map_edit
|
||||
my $nt = $_[3] || $text{'mapping_name'};
|
||||
my $vt = $_[4] || $text{'mapping_value'};
|
||||
|
||||
local @links = ( "<a href='edit_mapping.cgi?map_name=$_[0]'>".
|
||||
$text{'new_mapping'}."</a>",);
|
||||
|
||||
if ($#{$mappings} ne -1)
|
||||
{
|
||||
# Map description
|
||||
@@ -888,11 +891,8 @@ sub generate_map_edit
|
||||
# Start of the overall form
|
||||
print &ui_form_start("delete_mappings.cgi", "post");
|
||||
print &ui_hidden("map_name", $_[0]),"\n";
|
||||
local @links = ( &select_all_link("d", 1),
|
||||
&select_invert_link("d", 1),
|
||||
"<a href='edit_mapping.cgi?map_name=$_[0]'>".
|
||||
$text{'new_mapping'}."</a>",
|
||||
);
|
||||
unshift(@links, &select_all_link("d", 1),
|
||||
&select_invert_link("d", 1));
|
||||
print &ui_links_row(\@links);
|
||||
|
||||
my @grid;
|
||||
@@ -932,6 +932,11 @@ sub generate_map_edit
|
||||
print &ui_links_row(\@links);
|
||||
print &ui_form_end([ [ "delete", $text{'mapping_delete'} ] ]);
|
||||
}
|
||||
else {
|
||||
# None, so just show edit link
|
||||
print "<b>$text{'mapping_none'}</b><p>\n";
|
||||
print &ui_links_row(\@links);
|
||||
}
|
||||
|
||||
# Manual edit button
|
||||
if ($access{'manual'} && &can_map_manual($_[0])) {
|
||||
|
||||
Reference in New Issue
Block a user