Administrator email menu style

This commit is contained in:
Bob Mottram 2018-03-17 21:52:17 +00:00
parent 6c97c1601e
commit 44f8c11643
1 changed files with 12 additions and 23 deletions

View File

@ -1924,26 +1924,18 @@ function menu_backup_restore {
function menu_email {
while true
do
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Control Panel" \
--title $"Email Menu" \
--radiolist $"Choose an operation:" 15 70 8 \
1 $"Add a user to a mailing list" off \
2 $"Remove a user from a mailing list" off \
3 $"Add an email rule" off \
4 $"Block/Unblock an email address" off \
5 $"Block/Unblock email with subject text" off \
6 $"Outgoing Email Proxy" off \
7 $"Extra email domains" off \
8 $"Back to main menu" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
break;;
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
W=(1 $"Add a user to a mailing list"
2 $"Remove a user from a mailing list"
3 $"Add an email rule"
4 $"Block/Unblock an email address"
5 $"Block/Unblock email with subject text"
6 $"Outgoing Email Proxy"
7 $"Extra email domains")
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Email Menu" --menu $"Choose an operation, or ESC for main menu:" 15 70 8 "${W[@]}" 3>&2 2>&1 1>&3)
case $selection in
1) add_to_mailing_list;;
2) remove_user_from_mailing_list;;
3) email_rule;;
@ -1951,10 +1943,7 @@ function menu_email {
5) block_unblock_subject;;
6) email_smtp_proxy;;
7) email_extra_domains;;
8) rm -f "$data"
break;;
esac
rm -f "$data"
done
}