Messages: Misc improvements. Ability to set usage type(s) on Destinations for From field.

This commit is contained in:
Nate
2018-12-29 16:05:59 -07:00
parent 7ade63d978
commit 05a888c9c6
6 changed files with 190 additions and 20 deletions
+12
View File
@@ -184,6 +184,18 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the accountcode.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_voice";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for voice calls.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_fax";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for fax calls.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_text";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for text messages.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_app";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the application.";
+100
View File
@@ -621,6 +621,86 @@ $text['label-detail_action']['ru-ru'] = "Действия";
$text['label-detail_action']['sv-se'] = "Åtgärder";
$text['label-detail_action']['uk-ua'] = "Дії";
$text['label-usage']['en-us'] = "Usage";
$text['label-usage']['ar-eg'] = "";
$text['label-usage']['de-at'] = "";
$text['label-usage']['de-ch'] = "";
$text['label-usage']['de-de'] = "";
$text['label-usage']['es-cl'] = "";
$text['label-usage']['es-mx'] = "";
$text['label-usage']['fr-ca'] = "";
$text['label-usage']['fr-fr'] = "";
$text['label-usage']['he-il'] = "";
$text['label-usage']['it-it'] = "";
$text['label-usage']['nl-nl'] = "";
$text['label-usage']['pl-pl'] = "";
$text['label-usage']['pt-br'] = "";
$text['label-usage']['pt-pt'] = "";
$text['label-usage']['ro-ro'] = "";
$text['label-usage']['ru-ru'] = "";
$text['label-usage']['sv-se'] = "";
$text['label-usage']['uk-ua'] = "";
$text['label-voice']['en-us'] = "Voice";
$text['label-voice']['ar-eg'] = "";
$text['label-voice']['de-at'] = "Sprache"; //copied from de-de
$text['label-voice']['de-ch'] = "Sprache"; //copied from de-de
$text['label-voice']['de-de'] = "Sprache";
$text['label-voice']['es-cl'] = "Voz";
$text['label-voice']['es-mx'] = "Voz"; //copied from es-cl
$text['label-voice']['fr-ca'] = "Voix"; //copied from fr-fr
$text['label-voice']['fr-fr'] = "Voix";
$text['label-voice']['he-il'] = "שיחה";
$text['label-voice']['it-it'] = "Voce";
$text['label-voice']['nl-nl'] = "";
$text['label-voice']['pl-pl'] = "Głos";
$text['label-voice']['pt-br'] = "Voz"; //copied from pt-pt
$text['label-voice']['pt-pt'] = "Voz";
$text['label-voice']['ro-ro'] = "";
$text['label-voice']['ru-ru'] = "Голос";
$text['label-voice']['sv-se'] = "Röst";
$text['label-voice']['uk-ua'] = "Голос";
$text['label-fax']['en-us'] = "Fax";
$text['label-fax']['ar-eg'] = "";
$text['label-fax']['de-at'] = "Fax"; //copied from de-de
$text['label-fax']['de-ch'] = "Fax"; //copied from de-de
$text['label-fax']['de-de'] = "Fax";
$text['label-fax']['es-cl'] = "Facsímil";
$text['label-fax']['es-mx'] = "Facsímil"; //copied from es-cl
$text['label-fax']['fr-ca'] = "Télécopie"; //copied from fr-fr
$text['label-fax']['fr-fr'] = "Télécopie";
$text['label-fax']['he-il'] = "פקס";
$text['label-fax']['it-it'] = "Fax";
$text['label-fax']['nl-nl'] = "";
$text['label-fax']['pl-pl'] = "Faks";
$text['label-fax']['pt-br'] = "FAX";
$text['label-fax']['pt-pt'] = "Fax";
$text['label-fax']['ro-ro'] = "";
$text['label-fax']['ru-ru'] = "Факс";
$text['label-fax']['sv-se'] = "Fax";
$text['label-fax']['uk-ua'] = "Факс";
$text['label-text']['en-us'] = "Text";
$text['label-text']['ar-eg'] = "";
$text['label-text']['de-at'] = "Text"; //copied from de-de
$text['label-text']['de-ch'] = "Text"; //copied from de-de
$text['label-text']['de-de'] = "Text";
$text['label-text']['es-cl'] = "Texto";
$text['label-text']['es-mx'] = "Texto"; //copied from es-cl
$text['label-text']['fr-ca'] = "Texte"; //copied from fr-fr
$text['label-text']['fr-fr'] = "Texte";
$text['label-text']['he-il'] = "טקסט";
$text['label-text']['it-it'] = "Testo";
$text['label-text']['nl-nl'] = "";
$text['label-text']['pl-pl'] = "Tekst";
$text['label-text']['pt-br'] = "Texto"; //copied from pt-pt
$text['label-text']['pt-pt'] = "Texto";
$text['label-text']['ro-ro'] = "";
$text['label-text']['ru-ru'] = "Текст";
$text['label-text']['sv-se'] = "Text";
$text['label-text']['uk-ua'] = "Текст";
$text['header-destinations']['en-us'] = "Destinations";
$text['header-destinations']['ar-eg'] = "جهات الأتصال";
$text['header-destinations']['de-at'] = "Ziele"; //copied from de-de
@@ -1021,6 +1101,26 @@ $text['description-account_code']['ru-ru'] = "Введите код учетно
$text['description-account_code']['sv-se'] = "Ange 'account code'.";
$text['description-account_code']['uk-ua'] = "Введіть код облікового запису";
$text['description-usage']['en-us'] = "Set how the Destination will be used.";
$text['description-usage']['ar-eg'] = "";
$text['description-usage']['de-at'] = "";
$text['description-usage']['de-ch'] = "";
$text['description-usage']['de-de'] = "";
$text['description-usage']['es-cl'] = "";
$text['description-usage']['es-mx'] = "";
$text['description-usage']['fr-ca'] = "";
$text['description-usage']['fr-fr'] = "";
$text['description-usage']['he-il'] = "";
$text['description-usage']['it-it'] = "";
$text['description-usage']['nl-nl'] = "";
$text['description-usage']['pl-pl'] = "";
$text['description-usage']['pt-br'] = "";
$text['description-usage']['pt-pt'] = "";
$text['description-usage']['ro-ro'] = "";
$text['description-usage']['ru-ru'] = "";
$text['description-usage']['sv-se'] = "";
$text['description-usage']['uk-ua'] = "";
$text['billing-warning']['en-us'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables.";
$text['billing-warning']['ar-eg'] = "";
$text['billing-warning']['de-at'] = "Wenn Sie die Fusionpbx Abrechnung verwenden, stellen Sie sicher, dass Account-Code und Betreiber-Variablen gesetzt sind."; //copied from de-de
+23 -1
View File
@@ -108,6 +108,9 @@
$currency_buy = trim($_POST["currency_buy"]);
$destination_record = trim($_POST["destination_record"]);
$destination_accountcode = trim($_POST["destination_accountcode"]);
$destination_type_voice = check_str($_POST["destination_type_voice"]);
$destination_type_fax = check_str($_POST["destination_type_fax"]);
$destination_type_text = check_str($_POST["destination_type_text"]);
$destination_carrier = trim($_POST["destination_carrier"]);
//convert the number to a regular expression
$destination_number_regex = string_to_regex($destination_number);
@@ -131,7 +134,7 @@
unset($_POST["db_destination_number"]);
}
//process the http post
//process the http post
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//get the uuid
@@ -589,6 +592,9 @@
$destination["destination_context"] = $destination_context;
$destination["destination_record"] = $destination_record;
$destination["destination_accountcode"] = $destination_accountcode;
$destination["destination_type_voice"] = $destination_type_voice ? 1 : null;
$destination["destination_type_fax"] = $destination_type_fax ? 1 : null;
$destination["destination_type_text"] = $destination_type_text ? 1 : null;
$destination["destination_app"] = $destination_app;
$destination["destination_data"] = $destination_data;
$destination["destination_alternate_app"] = $destination_alternate_app;
@@ -697,6 +703,9 @@
$destination_cid_name_prefix = $row["destination_cid_name_prefix"];
$destination_record = $row["destination_record"];
$destination_accountcode = $row["destination_accountcode"];
$destination_type_voice = $row["destination_type_voice"];
$destination_type_fax = $row["destination_type_fax"];
$destination_type_text = $row["destination_type_text"];
$destination_context = $row["destination_context"];
$destination_app = $row["destination_app"];
$destination_data = $row["destination_data"];
@@ -1057,6 +1066,19 @@
echo $text['description-account_code']."\n";
echo "</td>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-usage']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <label><input type='checkbox' name='destination_type_voice' id='destination_type_voice' value='1' ".($destination_type_voice ? "checked='checked'" : null)."> ".$text['label-voice']."</label>&nbsp;\n";
echo " <label><input type='checkbox' name='destination_type_fax' id='destination_type_fax' value='1' ".($destination_type_fax ? "checked='checked'" : null)."> ".$text['label-fax']."</label>&nbsp;\n";
echo " <label><input type='checkbox' name='destination_type_text' id='destination_type_text' value='1' ".($destination_type_text ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n";
echo "<br />\n";
echo $text['description-usage']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('destination_domain')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";