mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Variable form select value mods
This commit is contained in:
@@ -194,10 +194,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
if ($action == "add") {
|
||||
echo "<td width='30%' align='left'nowrap><b>".$text['header-var_add']."</b></td>\n";
|
||||
echo "<td width='30%' align='left'nowrap><b>".$text['header-variable_add']."</b><br><br></td>\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "<td width='30%' align='left' nowrap><b>".$text['header-var_edit']."</b></td>\n";
|
||||
echo "<td width='30%' align='left' nowrap><b>".$text['header-variable_edit']."</b><br><br></td>\n";
|
||||
}
|
||||
echo "<td width='70%' align='right'>";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='vars.php'\" value='".$text['button-back']."'>";
|
||||
@@ -245,7 +245,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='var_enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($var_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
|
||||
}
|
||||
@@ -269,27 +268,23 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " ".$text['label-order'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='var_order' class='formfld'>\n";
|
||||
if (strlen(htmlspecialchars($var_order ))> 0) {
|
||||
echo " <option selected='yes' value='".htmlspecialchars($var_order )."'>".htmlspecialchars($var_order )."</option>\n";
|
||||
}
|
||||
echo " <select name='var_order' class='formfld'>\n";
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
if (strlen($i) == 1) {
|
||||
echo " <option value='00$i'>00$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 2) {
|
||||
echo " <option value='0$i'>0$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 3) {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
$selected = ($var_order == $i) ? "selected" : null;
|
||||
if (strlen($i) == 1) {
|
||||
echo " <option value='00$i' ".$selected.">00$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 2) {
|
||||
echo " <option value='0$i' ".$selected.">0$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 3) {
|
||||
echo " <option value='$i' ".$selected.">$i</option>\n";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user