\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -157,7 +160,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -188,6 +191,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header
require_once "includes/header.php";
+ if ($action == "add") {
+ $page["title"] = $text['title-queue_detail_add'];
+ }
+ if ($action == "update") {
+ $page["title"] = $text['title-queue_detail_edit'];
+ }
//show the content
echo "";
@@ -201,12 +210,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "\n";
if ($action == "add") {
- echo "Queue Detail Add \n";
+ echo "".$text['header-queue_detail_add']." \n";
}
if ($action == "update") {
- echo "Queue Detail Update \n";
+ echo "".$text['header-queue_detail_edit']." \n";
}
- echo " \n";
+ echo " \n";
echo " \n";
?>
@@ -214,65 +223,65 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
function public_include_details_tag_onchange() {
var dialplan_detail_tag = document.getElementById("form_tag").value;
if (dialplan_detail_tag == "condition") {
- document.getElementById("label_field_type").innerHTML = "Field";
- document.getElementById("label_field_data").innerHTML = "Expression";
+ document.getElementById("label_field_type").innerHTML = "=$text['label-field']?>";
+ document.getElementById("label_field_data").innerHTML = "=$text['label-expression']?>";
}
else if (dialplan_detail_tag == "action") {
- document.getElementById("label_field_type").innerHTML = "Application";
- document.getElementById("label_field_data").innerHTML = "Data";
+ document.getElementById("label_field_type").innerHTML = "=$text['label-application']?>";
+ document.getElementById("label_field_data").innerHTML = "=$text['label-data']?>";
}
else if (dialplan_detail_tag == "anti-action") {
- document.getElementById("label_field_type").innerHTML = "Application";
- document.getElementById("label_field_data").innerHTML = "Data";
+ document.getElementById("label_field_type").innerHTML = "=$text['label-application']?>";
+ document.getElementById("label_field_data").innerHTML = "=$text['label-data']?>";
}
else if (dialplan_detail_tag == "param") {
- document.getElementById("label_field_type").innerHTML = "Name";
- document.getElementById("label_field_data").innerHTML = "Value";
+ document.getElementById("label_field_type").innerHTML = "=$text['label-name']?>";
+ document.getElementById("label_field_data").innerHTML = "=$text['label-value']?>";
}
if (dialplan_detail_tag == "") {
- document.getElementById("label_field_type").innerHTML = "Type";
- document.getElementById("label_field_data").innerHTML = "Data";
+ document.getElementById("label_field_type").innerHTML = "=$text['label-type']?>";
+ document.getElementById("label_field_data").innerHTML = "=$text['label-data']?>";
}
}
\n";
echo "\n";
- echo " Tag:\n";
+ echo " ".$text['label-tag'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
switch (htmlspecialchars($dialplan_detail_tag)) {
case "condition":
- echo " condition \n";
- echo " action \n";
- echo " anti-action \n";
- //echo " param \n";
+ echo " ".$text['option-condition']." \n";
+ echo " ".$text['option-action']." \n";
+ echo " ".$text['option-anti-action']." \n";
+ //echo " ".$text['option-parameter']." \n";
break;
case "action":
- echo " condition \n";
- echo " action \n";
- echo " anti-action \n";
- //echo " param \n";
+ echo " ".$text['option-condition']." \n";
+ echo " ".$text['option-action']." \n";
+ echo " ".$text['option-anti-action']." \n";
+ //echo " ".$text['option-parameter']." \n";
break;
case "anti-action":
- echo " condition \n";
- echo " action \n";
- echo " anti-action \n";
- //echo " param \n";
+ echo " ".$text['option-condition']." \n";
+ echo " ".$text['option-action']." \n";
+ echo " ".$text['option-anti-action']." \n";
+ //echo " ".$text['option-parameter']." \n";
break;
case "param":
- echo " condition \n";
- echo " action \n";
- echo " anti-action \n";
- //echo " param \n";
+ echo " ".$text['option-condition']." \n";
+ echo " ".$text['option-action']." \n";
+ echo " ".$text['option-anti-action']." \n";
+ //echo " ".$text['option-parameter']." \n";
break;
default:
- echo " condition \n";
- echo " action \n";
- echo " anti-action \n";
- //echo " param \n";
+ echo " ".$text['option-condition']." \n";
+ echo " ".$text['option-action']." \n";
+ echo " ".$text['option-anti-action']." \n";
+ //echo " ".$text['option-parameter']." \n";
}
echo " \n";
@@ -295,7 +304,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo " Order:\n";
+ echo " ".$text['label-order'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -324,8 +333,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo "\n";
- echo " Type:\n";
+ echo " \n";
+ echo " ".$text['label-type'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -335,8 +344,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo "\n";
- echo " Data:\n";
+ echo " \n";
+ echo " ".$text['label-data'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -350,7 +359,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") {
echo " \n";
}
- echo " \n";
+ echo " \n";
echo " \n";
echo " ";
echo "
";
@@ -364,7 +373,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($v_path_show) {
echo "
\n";
echo "
\n";
- echo "
Additional Information \n";
+ echo "
".$text['header-additional_information']." \n";
echo "
\n";
echo "
\n";
diff --git a/app/fifo/fifo_edit.php b/app/fifo/fifo_edit.php
index 177cb55fd0..2d073d6c40 100644
--- a/app/fifo/fifo_edit.php
+++ b/app/fifo/fifo_edit.php
@@ -35,6 +35,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//set the action to an add or an update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -63,12 +69,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
- if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; }
- if (strlen($dialplan_name) == 0) { $msg .= "Please provide: Extension Name
\n"; }
- if (strlen($dialplan_order) == 0) { $msg .= "Please provide: Order
\n"; }
- //if (strlen($dialplan_context) == 0) { $msg .= "Please provide: Context
\n"; }
- if (strlen($dialplan_enabled) == 0) { $msg .= "Please provide: Enabled
\n"; }
- //if (strlen($dialplan_description) == 0) { $msg .= "Please provide: Description
\n"; }
+ if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid
\n"; }
+ if (strlen($dialplan_name) == 0) { $msg .= $text['message-required'].$text['label-name']."
\n"; }
+ if (strlen($dialplan_order) == 0) { $msg .= $text['message-required'].$text['label-order']."
\n"; }
+ if (strlen($dialplan_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
require_once "includes/persistformvar.php";
@@ -130,7 +134,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -163,7 +167,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -195,6 +199,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header
require_once "includes/header.php";
+ $page["title"] = $text['title-queue_edit'];
//show the content
echo "
";
@@ -208,15 +213,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo " \n";
- echo " \n";
- echo " Queues \n";
- echo " \n";
- echo "
\n";
- echo " \n";
+ echo " ".$text['header-queue_edit']."
\n";
+ echo " \n";
echo " \n";
echo " \n";
echo " \n";
- echo " Queues are used to setup waiting lines for callers. Also known as FIFO Queues.\n";
+ echo " ".$text['description-queue_edit']."\n";
echo " \n";
echo " \n";
echo " \n";
@@ -227,7 +229,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
- echo " Name:\n";
+ echo " ".$text['label-name'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -238,7 +240,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo " Order:\n";
+ echo " ".$text['label-order'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -267,60 +269,49 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo " \n";
- //echo "\n";
- //echo "\n";
- //echo " Context:\n";
- //echo " \n";
- //echo "\n";
- //echo " \n";
- //echo " \n";
- //echo "\n";
- //echo " \n";
- //echo " \n";
-
echo "\n";
echo "\n";
- echo " Continue:\n";
+ echo " ".$text['label-continue'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
- if ($dialplan_continue == "true") {
- echo " true \n";
+ if ($dialplan_continue == "true") {
+ echo " ".$text['option-true']." \n";
}
else {
- echo " true \n";
+ echo " ".$text['option-true']." \n";
}
- if ($dialplan_continue == "false") {
- echo " false \n";
+ if ($dialplan_continue == "false") {
+ echo " ".$text['option-false']." \n";
}
else {
- echo " false \n";
+ echo " ".$text['option-false']." \n";
}
echo " \n";
echo " \n";
- echo "Extension Continue in most cases is false.\n";
+ echo $text['description-continue']."\n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Enabled:\n";
+ echo " ".$text['label-enabled'].":\n";
echo " \n";
echo "\n";
echo " \n";
echo " \n";
- if ($dialplan_enabled == "true") {
- echo " true \n";
+ if ($dialplan_enabled == "true") {
+ echo " ".$text['option-true']." \n";
}
else {
- echo " true \n";
+ echo " ".$text['option-true']." \n";
}
- if ($dialplan_enabled == "false") {
- echo " false \n";
+ if ($dialplan_enabled == "false") {
+ echo " ".$text['option-false']." \n";
}
else {
- echo " false \n";
+ echo " ".$text['option-false']." \n";
}
echo " \n";
echo " \n";
@@ -330,7 +321,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " \n";
echo "\n";
- echo " Description:\n";
+ echo " ".$text['label-description'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -343,7 +334,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") {
echo " \n";
}
- echo " \n";
+ echo " \n";
echo " \n";
echo " ";
echo "
";
@@ -365,11 +356,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo " \n";
- echo " Conditions and Actions \n";
- echo " \n";
- echo " The following conditions, actions and anti-actions are used in the dialplan to direct \n";
- echo " call flow. Each is processed in order until you reach the action dialplan_detail_tag which tells what action to perform. \n";
- echo " You are not limited to only one condition or action dialplan_detail_tag for a given extension.\n";
+ echo "
".$text['header-conditions_and_actions']." \n";
+ echo " ".$text['description-conditions_and_actions']."\n";
echo "
\n";
echo " \n";
echo "
";
@@ -395,13 +383,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "\n";
- echo "Tag \n";
- echo "Type \n";
- echo "Data \n";
- echo "Order \n";
+ echo "".$text['label-tag']." \n";
+ echo "".$text['label-type']." \n";
+ echo "".$text['label-data']." \n";
+ echo "".$text['label-order']." \n";
echo "\n";
if (permission_exists('fifo_add')) {
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
}
echo " \n";
echo " \n";
@@ -415,10 +403,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$row[dialplan_detail_order]." \n";
echo " \n";
if (permission_exists('fifo_edit')) {
- echo " $v_link_label_edit \n";
+ echo " $v_link_label_edit \n";
}
if (permission_exists('fifo_delete')) {
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_delete \n";
}
echo " \n";
echo " \n";
@@ -448,10 +436,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$row[dialplan_detail_order]." \n";
echo " \n";
if (permission_exists('fifo_edit')) {
- echo " $v_link_label_edit \n";
+ echo " $v_link_label_edit \n";
}
if (permission_exists('fifo_delete')) {
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_delete \n";
}
echo " \n";
echo "\n";
@@ -484,10 +472,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$row[dialplan_detail_order]." \n";
echo " \n";
if (permission_exists('fifo_edit')) {
- echo " $v_link_label_edit \n";
+ echo " $v_link_label_edit \n";
}
if (permission_exists('fifo_delete')) {
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_delete \n";
}
echo " \n";
echo "\n";
@@ -504,7 +492,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " $paging_controls \n";
echo " \n";
if (permission_exists('fifo_add')) {
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
}
echo " \n";
echo " \n";