Add div with class card

This commit is contained in:
FusionPBX 2025-03-24 18:32:32 -06:00 committed by GitHub
parent e0b8adf376
commit 90bae99e3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 29 additions and 7 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2024 Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -70,30 +70,37 @@
$toll_allow = $_POST["toll_allow"] ?? ''; $toll_allow = $_POST["toll_allow"] ?? '';
$pin_numbers_enable = $_POST["pin_numbers_enabled"] ?? null; $pin_numbers_enable = $_POST["pin_numbers_enabled"] ?? null;
if (empty($pin_numbers_enable)) { $pin_numbers_enable = "false"; } if (empty($pin_numbers_enable)) { $pin_numbers_enable = "false"; }
//set the default type //set the default type
$gateway_type = 'gateway'; $gateway_type = 'gateway';
$gateway_2_type = 'gateway'; $gateway_2_type = 'gateway';
$gateway_3_type = 'gateway'; $gateway_3_type = 'gateway';
//set the gateway type to bridge //set the gateway type to bridge
if (strtolower(substr($gateway, 0, 6)) == "bridge") { if (strtolower(substr($gateway, 0, 6)) == "bridge") {
$gateway_type = 'bridge'; $gateway_type = 'bridge';
} }
//set the type to enum //set the type to enum
if (strtolower(substr($gateway, 0, 4)) == "enum") { if (strtolower(substr($gateway, 0, 4)) == "enum") {
$gateway_type = 'enum'; $gateway_type = 'enum';
} }
//set the type to freetdm //set the type to freetdm
if (strtolower(substr($gateway, 0, 7)) == "freetdm") { if (strtolower(substr($gateway, 0, 7)) == "freetdm") {
$gateway_type = 'freetdm'; $gateway_type = 'freetdm';
} }
//set the type to transfer //set the type to transfer
if (strtolower(substr($gateway, 0, 8)) == "transfer") { if (strtolower(substr($gateway, 0, 8)) == "transfer") {
$gateway_type = 'transfer'; $gateway_type = 'transfer';
} }
//set the type to dingaling //set the type to dingaling
if (strtolower(substr($gateway, 0, 4)) == "xmpp") { if (strtolower(substr($gateway, 0, 4)) == "xmpp") {
$gateway_type = 'xmpp'; $gateway_type = 'xmpp';
} }
//set the gateway_uuid and gateway_name //set the gateway_uuid and gateway_name
if ($gateway_type == "gateway") { if ($gateway_type == "gateway") {
$gateway_array = explode(":",$gateway); $gateway_array = explode(":",$gateway);
@ -107,26 +114,32 @@
//set the gateway_2 variable //set the gateway_2 variable
$gateway_2 = $_POST["gateway_2"]; $gateway_2 = $_POST["gateway_2"];
//set the type to bridge //set the type to bridge
if (strtolower(substr($gateway_2, 0, 6)) == "bridge") { if (strtolower(substr($gateway_2, 0, 6)) == "bridge") {
$gateway_2_type = 'bridge'; $gateway_2_type = 'bridge';
} }
//set type to enum //set type to enum
if (strtolower(substr($gateway_2, 0, 4)) == "enum") { if (strtolower(substr($gateway_2, 0, 4)) == "enum") {
$gateway_2_type = 'enum'; $gateway_2_type = 'enum';
} }
//set the type to freetdm //set the type to freetdm
if (strtolower(substr($gateway_2, 0, 7)) == "freetdm") { if (strtolower(substr($gateway_2, 0, 7)) == "freetdm") {
$gateway_2_type = 'freetdm'; $gateway_2_type = 'freetdm';
} }
//set the type to transfer //set the type to transfer
if (strtolower(substr($gateway_2, 0, 8)) == "transfer") { if (strtolower(substr($gateway_2, 0, 8)) == "transfer") {
$gateway_type = 'transfer'; $gateway_type = 'transfer';
} }
//set the type to dingaling //set the type to dingaling
if (strtolower(substr($gateway_2, 0, 4)) == "xmpp") { if (strtolower(substr($gateway_2, 0, 4)) == "xmpp") {
$gateway_2_type = 'xmpp'; $gateway_2_type = 'xmpp';
} }
//set the gateway_2_id and gateway_2_name //set the gateway_2_id and gateway_2_name
if ($gateway_2_type == "gateway" && !empty($_POST["gateway_2"])) { if ($gateway_2_type == "gateway" && !empty($_POST["gateway_2"])) {
$gateway_2_array = explode(":",$gateway_2); $gateway_2_array = explode(":",$gateway_2);
@ -140,26 +153,32 @@
//set the gateway_3 variable //set the gateway_3 variable
$gateway_3 = $_POST["gateway_3"]; $gateway_3 = $_POST["gateway_3"];
//set the type to bridge //set the type to bridge
if (strtolower(substr($gateway_3, 0, 6)) == "bridge") { if (strtolower(substr($gateway_3, 0, 6)) == "bridge") {
$gateway_3_type = 'bridge'; $gateway_3_type = 'bridge';
} }
//set the type to enum //set the type to enum
if (strtolower(substr($gateway_3, 0, 4)) == "enum") { if (strtolower(substr($gateway_3, 0, 4)) == "enum") {
$gateway_3_type = 'enum'; $gateway_3_type = 'enum';
} }
//set the type to freetdm //set the type to freetdm
if (strtolower(substr($gateway_3, 0, 7)) == "freetdm") { if (strtolower(substr($gateway_3, 0, 7)) == "freetdm") {
$gateway_3_type = 'freetdm'; $gateway_3_type = 'freetdm';
} }
//set the type to dingaling //set the type to dingaling
if (strtolower(substr($gateway_3, 0, 4)) == "xmpp") { if (strtolower(substr($gateway_3, 0, 4)) == "xmpp") {
$gateway_3_type = 'xmpp'; $gateway_3_type = 'xmpp';
} }
//set the type to transfer //set the type to transfer
if (strtolower(substr($gateway_3, 0, 8)) == "transfer") { if (strtolower(substr($gateway_3, 0, 8)) == "transfer") {
$gateway_type = 'transfer'; $gateway_type = 'transfer';
} }
//set the gateway_3_id and gateway_3_name //set the gateway_3_id and gateway_3_name
if ($gateway_3_type == "gateway" && !empty($_POST["gateway_3"])) { if ($gateway_3_type == "gateway" && !empty($_POST["gateway_3"])) {
$gateway_3_array = explode(":",$gateway_3); $gateway_3_array = explode(":",$gateway_3);
@ -170,6 +189,7 @@
$gateway_3_id = ''; $gateway_3_id = '';
$gateway_3_name = ''; $gateway_3_name = '';
} }
//set additional variables //set additional variables
$dialplan_enabled = $_POST["dialplan_enabled"] ?? 'false'; $dialplan_enabled = $_POST["dialplan_enabled"] ?? 'false';
$dialplan_description = $_POST["dialplan_description"]; $dialplan_description = $_POST["dialplan_description"];
@ -939,6 +959,7 @@ function type_onchange(dialplan_detail_type) {
echo $text['description-outbound-routes']."\n"; echo $text['description-outbound-routes']."\n";
echo "<br /><br />\n"; echo "<br /><br />\n";
echo "<div class='card'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
@ -1346,15 +1367,16 @@ function type_onchange(dialplan_detail_type) {
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>"; echo "</table>\n";
echo "<br><br>"; echo "</div>\n";
echo "<br><br>\n";
if (!empty($action) && $action == "update") { if (!empty($action) && $action == "update") {
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n"; echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n";
} }
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n"; echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>"; echo "</form>\n";
//show the footer //show the footer
require_once "resources/footer.php"; require_once "resources/footer.php";