Update dialplan_add.php

Update the indentation and condense the width of the items so they will be more mobile device friendly.
This commit is contained in:
FusionPBX 2016-09-03 10:07:14 -06:00 committed by GitHub
parent 9380b46f95
commit dd5f68fc53
1 changed files with 518 additions and 512 deletions

View File

@ -17,15 +17,19 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2014
Portions created by the Initial Developer are Copyright (C) 2008-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('dialplan_add')) {
//access granted
}
@ -79,6 +83,7 @@ else {
//set the default
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['context']; }
//add or update data from http post
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//check for all required data
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
@ -262,6 +267,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//initialize the destinations object
$destination = new destinations;
//javascript type on change
?><script type="text/javascript">
<!--
function type_onchange(dialplan_detail_type) {
@ -292,6 +298,7 @@ function type_onchange(dialplan_detail_type) {
</script>
<?php
//show the content
echo "<form method='post' name='frm' action=''>\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
@ -319,7 +326,7 @@ echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' style='width: 60%;' type='text' name='dialplan_name' maxlength='255' value=\"$dialplan_name\">\n";
echo " <input class='formfld' type='text' name='dialplan_name' maxlength='255' value=\"$dialplan_name\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
@ -388,10 +395,10 @@ function Replace_condition_field_1(obj){
}
</script>
<?php
echo " <table width='70%' border='0'>\n";
echo " <table border='0'>\n";
echo " <tr>\n";
echo " <td nowrap='nowrap'>".$text['label-field']."</td>\n";
echo " <td style='width: 50%;' nowrap='nowrap'>\n";
//echo " <td nowrap='nowrap'>".$text['label-field']."</td>\n";
echo " <td nowrap='nowrap'>\n";
echo " <select class='formfld' name='condition_field_1' id='condition_field_1' onchange='changeToInput_condition_field_1(this);this.style.visibility = \"hidden\";' style='width:85%'>\n";
echo " <option value=''></option>\n";
if (strlen($condition_field_1) > 0) {
@ -428,9 +435,9 @@ echo " </select>\n";
echo " <input type='button' id='btn_select_to_input_condition_field_1' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_1(document.getElementById(\"condition_field_1\"));this.style.visibility = \"hidden\";' value='&#9665;'>\n";
echo " <br />\n";
echo " </td>\n";
echo " <td>&nbsp;&nbsp;&nbsp;".$text['label-expression']."</td>\n";
echo " <td width='50%'>\n";
echo " <input class='formfld' type='text' name='condition_expression_1' maxlength='255' style='width:100%' value=\"$condition_expression_1\">\n";
//echo " <td>&nbsp;&nbsp;&nbsp;".$text['label-expression']."</td>\n";
echo " <td>\n";
echo " &nbsp;<input class='formfld' type='text' name='condition_expression_1' maxlength='255' value=\"$condition_expression_1\">\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
@ -444,10 +451,10 @@ echo " ".$text['label-condition_2']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <table width='70%' border='0'>\n";
echo " <table border='0'>\n";
echo " <tr>\n";
echo " <td align='left'>".$text['label-field']."</td>\n";
echo " <td style='width: 50%;' nowrap='nowrap'>\n";
//echo " <td align='left'>".$text['label-field']."</td>\n";
echo " <td nowrap='nowrap'>\n";
?>
<script>
var Objs;
@ -481,7 +488,7 @@ function Replace_condition_field_2(obj){
}
</script>
<?php
echo " <select class='formfld' name='condition_field_2' id='condition_field_2' onchange='changeToInput_condition_field_2(this);this.style.visibility = \"hidden\";' style='width:85%'>\n";
echo " <select class='formfld' name='condition_field_2' id='condition_field_2' onchange='changeToInput_condition_field_2(this);this.style.visibility = \"hidden\";'>\n";
echo " <option value=''></option>\n";
if (strlen($condition_field_2) > 0) {
echo " <option value='$condition_field_2' selected>$condition_field_2</option>\n";
@ -517,10 +524,9 @@ echo " </select>\n";
echo " <input type='button' id='btn_select_to_input_condition_field_2' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_2(document.getElementById(\"condition_field_2\"));this.style.visibility = \"hidden\";' value='&#9665;'>\n";
echo " <br />\n";
echo " </td>\n";
echo " <td>&nbsp;&nbsp;&nbsp;".$text['label-expression']."\n";
echo " </td>\n";
echo " <td width='50%'>\n";
echo " <input class='formfld' type='text' name='condition_expression_2' maxlength='255' style='width:100%' value=\"$condition_expression_2\">\n";
//echo " <td>&nbsp;&nbsp;&nbsp;".$text['label-expression']."</td>\n";
echo " <td>\n";
echo " &nbsp;<input class='formfld' type='text' name='condition_expression_2' maxlength='255' value=\"$condition_expression_2\">\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
@ -626,7 +632,7 @@ echo "</table>";
echo "<br><br>";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>