Add multiple email fields (#2365)

Add multiple email fields to make entering multiple email addresses easier.
This commit is contained in:
netpro25
2017-02-08 16:32:07 -05:00
committed by FusionPBX
parent 4394d12268
commit 289861272e

View File

@@ -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 "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email' maxlength='255' value=\"$fax_email\">\n";
echo "<table border='0' cellpadding='2' cellspacing='0'>\n";
$fax_emails = explode(',',$fax_email);
$x = 0;
foreach($fax_emails as $email) {
echo "<tr>\n";
echo "<td>\n";
echo " <input class='formfld' type=\"text\" name=\"fax_email[".$x."]\" maxlength='255' style=\"width: 90%;\"value=\"".$email."\">\n";
echo "</td>\n";
$x++;
}
echo "<tr>\n";
echo " <td>\n";
echo " <input class='formfld' type=\"text\" name=\"fax_email[".$x++."]\" maxlength='255' style=\"width: 90%;\"value=\"\">\n";
echo " </td>\n";
echo "</table>\n";
echo " ".$text['description-email']."\n";
echo "<br />\n";
if (permission_exists('fax_extension_advanced') && function_exists("imap_open") && file_exists("fax_files_remote.php")) {
echo "<input type='button' class='btn' value='".$text['button-advanced']."' onclick=\"toggle_advanced('advanced_email_connection');\">\n";
}
echo "<br />\n";
echo " ".$text['description-email']."\n";
echo "</td>\n";
echo "</tr>\n";