Fix the service toggle (#7943)
This commit is contained in:
@@ -153,7 +153,7 @@ class services {
|
||||
*/
|
||||
public function toggle($records) {
|
||||
// Permission not found
|
||||
if (permission_exists($this->name.'_edit')) {
|
||||
if (!permission_exists($this->name.'_edit')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2025
|
||||
Portions created by the Initial Developer are Copyright (C) 2026
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
@@ -77,9 +77,8 @@
|
||||
switch ($action) {
|
||||
case 'toggle':
|
||||
if (permission_exists('service_edit')) {
|
||||
$database->toggle($array);
|
||||
// $obj = new services;
|
||||
// $obj->toggle($services);
|
||||
$obj = new services;
|
||||
$obj->toggle($services);
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
@@ -245,7 +244,7 @@
|
||||
if (permission_exists('service_add') || permission_exists('service_edit') || permission_exists('service_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='services[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='services[$x][service_uuid]' value='".escape($row['service_uuid'])."' />\n";
|
||||
echo " <input type='hidden' name='services[$x][uuid]' value='".escape($row['service_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td>\n";
|
||||
@@ -290,4 +289,4 @@
|
||||
// include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user