Queue - Add: Integrate new toggle switch for Enabled field.

This commit is contained in:
fusionate 2023-06-08 20:14:43 +00:00
parent 6b07e8d168
commit 0396809b65
No known key found for this signature in database
1 changed files with 12 additions and 6 deletions

View File

@ -488,12 +488,18 @@
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='dialplan_enabled'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".(!empty($dialplan_enabled) && $dialplan_enabled == "false" ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='dialplan_enabled' name='dialplan_enabled' value='true' checked='checked'>\n";
echo " <span class='slider'></span>\n";
echo " </label>\n";
}
else {
echo " <select class='formfld' id='dialplan_enabled' name='dialplan_enabled'>\n";
echo " <option value='true' ".($dialplan_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($dialplan_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo "\n";
}
echo "</td>\n";
echo "</tr>\n";