Add dashboard, device, extension, and gateway enabled toggle (#6548)
* Update system_counts.php * Update call_forward.php * Add dashboard widget enabled toggle * Add device enabled toggle * Add extension enabled toggle * Add gateway enabled toggle * Update extension_edit.php * Update extension_edit.php * Update device_edit.php * Update gateway_edit.php
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
$context = $_POST["context"];
|
||||
$profile = $_POST["profile"];
|
||||
$hostname = $_POST["hostname"];
|
||||
$enabled = $_POST["enabled"];
|
||||
$enabled = $_POST["enabled"] ?: 'false';
|
||||
$description = $_POST["description"];
|
||||
}
|
||||
|
||||
@@ -876,20 +876,18 @@
|
||||
echo " ".$text['label-enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='enabled'>\n";
|
||||
if ($enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='enabled' name='enabled' value='true' ".($enabled == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
echo " <select class='formfld' id='enabled' name='enabled'>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".($enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
if ($enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-enabled']."\n";
|
||||
echo "</td>\n";
|
||||
|
||||
Reference in New Issue
Block a user