From 289861272ed29b0af4473a91230da4df8bbdf391 Mon Sep 17 00:00:00 2001 From: netpro25 Date: Wed, 8 Feb 2017 16:32:07 -0500 Subject: [PATCH] Add multiple email fields (#2365) Add multiple email fields to make entering multiple email addresses easier. --- app/fax/fax_edit.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index a22c70293c..7dc3a6716c 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -92,7 +92,7 @@ $fax_accountcode = check_str($_POST["accountcode"]); $fax_destination_number = check_str($_POST["fax_destination_number"]); $fax_prefix = check_str($_POST["fax_prefix"]); - $fax_email = check_str($_POST["fax_email"]); + $fax_email = check_str(implode(',',array_filter($_POST["fax_email"]))); $fax_email_connection_type = check_str($_POST["fax_email_connection_type"]); $fax_email_connection_host = check_str($_POST["fax_email_connection_host"]); $fax_email_connection_port = check_str($_POST["fax_email_connection_port"]); @@ -555,12 +555,27 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-email']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo "\n"; + $fax_emails = explode(',',$fax_email); + $x = 0; + foreach($fax_emails as $email) { + echo "\n"; + echo "\n"; + $x++; + } + echo "\n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-email']."\n"; + echo "
\n"; if (permission_exists('fax_extension_advanced') && function_exists("imap_open") && file_exists("fax_files_remote.php")) { echo "\n"; } echo "
\n"; - echo " ".$text['description-email']."\n"; echo "\n"; echo "\n";