From 9014b18cea25c6d7d3bb3ef21f5aa1743b7e2ab0 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 21 Jun 2024 20:00:24 +0700 Subject: [PATCH] remove pool_expired --- system/devices/Radius.php | 3 +-- ui/ui/hotspot-add.tpl | 9 --------- ui/ui/hotspot-edit.tpl | 10 ---------- ui/ui/pppoe-add.tpl | 8 -------- ui/ui/scripts/custom.js | 1 - 5 files changed, 1 insertion(+), 30 deletions(-) diff --git a/system/devices/Radius.php b/system/devices/Radius.php index 7cd59f77..5c4fb2f1 100644 --- a/system/devices/Radius.php +++ b/system/devices/Radius.php @@ -22,8 +22,7 @@ class Radius { $p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']); $this->customerAddPlan($customer, $plan); } else { - $this->upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool_expired'], ':='); - $this->disconnectCustomer($customer['username']); + $this->customerDeactivate($customer['username'], true); } } diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index 823578cc..b1106a82 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -238,15 +238,6 @@ if (cek.checked) { $("#routerChoose").addClass('hidden'); document.getElementById("routers").required = false; - $("#pool_expired").html(''); - $.ajax({ - url: "index.php?_route=autoload/pool", - data: "routers=radius", - cache: false, - success: function(msg) { - $("#pool_expired").html(msg); - } - }); } else { document.getElementById("routers").required = true; $("#routerChoose").removeClass('hidden'); diff --git a/ui/ui/hotspot-edit.tpl b/ui/ui/hotspot-edit.tpl index 0acef1c8..d5332f1d 100644 --- a/ui/ui/hotspot-edit.tpl +++ b/ui/ui/hotspot-edit.tpl @@ -302,16 +302,6 @@ $("#routerChoose").removeClass('hidden'); } } - setTimeout(() => { - $.ajax({ - url: "index.php?_route=autoload/pool", - data: "routers=radius", - cache: false, - success: function(msg) { - $("#pool_expired").html(msg); - } - }); - }, 2000); {/literal} {/if} diff --git a/ui/ui/pppoe-add.tpl b/ui/ui/pppoe-add.tpl index 48139e97..9403da6a 100644 --- a/ui/ui/pppoe-add.tpl +++ b/ui/ui/pppoe-add.tpl @@ -190,14 +190,6 @@ $("#pool_name").html(msg); } }); - $.ajax({ - url: "index.php?_route=autoload/pool", - data: "routers=radius", - cache: false, - success: function(msg) { - $("#pool_expired").html(msg); - } - }); } else { document.getElementById("routers").required = true; document.getElementById("routers").disabled = false; diff --git a/ui/ui/scripts/custom.js b/ui/ui/scripts/custom.js index aa936ba2..7b33f116 100644 --- a/ui/ui/scripts/custom.js +++ b/ui/ui/scripts/custom.js @@ -48,7 +48,6 @@ $(document).ready(function(){ cache: false, success: function(msg){ $("#pool_name").html(msg); - $("#pool_expired").html(msg); } }); });