From 6065d500e6197d0540fb7c7629704f01b736c7f8 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 15 Nov 2007 22:24:26 +0000 Subject: [PATCH] Added a button for manually editing the aliases file --- postfix/CHANGELOG | 1 + postfix/aliases.cgi | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/postfix/CHANGELOG b/postfix/CHANGELOG index add93305e..71af902c1 100644 --- a/postfix/CHANGELOG +++ b/postfix/CHANGELOG @@ -46,3 +46,4 @@ Added a popup window for selecting a map source, rather than having to type in s Maps in MySQL and LDAP databases can be viewed and edited in the same way that those in regular files are, if the appropriate Perl modules are installed (DBI and DBD::mysql for MySQL, or Net::LDAP for LDAP). This also applies to email aliases. ---- Changes since 1.380 ---- Fixed a bug that prevented comments and manual map editing, and added back support for PCRE maps. +Added a button for manually editing the aliases file. diff --git a/postfix/aliases.cgi b/postfix/aliases.cgi index d8d7fe264..3065ef518 100755 --- a/postfix/aliases.cgi +++ b/postfix/aliases.cgi @@ -86,13 +86,20 @@ else { print &ui_links_row(\@links); print &ui_form_end([ [ "delete", $text{'aliases_delete'} ] ]); -# new alias form -print "
\n"; -print "
\n"; -print "\n"; -print "\n"; -print "
$text{'new_aliasmsg'}\n"; -print "
\n"; +# new alias button +print &ui_buttons_start(); +print &ui_buttons_row("edit_alias.cgi", $text{'new_alias'}, + $text{'new_aliasmsg'}, + &ui_hidden("new", 1)); + +# manual edit button +if ($access{'manual'} && &can_map_manual($_[0])) { + print &ui_buttons_row("edit_manual.cgi", $text{'new_manual'}, + $text{'new_manualmsg'}, + &ui_hidden("map_name", "alias_maps")); + } + +print &ui_buttons_end(); &ui_print_footer("", $text{'index_return'});