diff --git a/ui/ui/admin-add.tpl b/ui/ui/admin-add.tpl index 85f97caf..640747e2 100644 --- a/ui/ui/admin-add.tpl +++ b/ui/ui/admin-add.tpl @@ -101,7 +101,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/admin-edit.tpl b/ui/ui/admin-edit.tpl index 9e406d9f..f04d71be 100644 --- a/ui/ui/admin-edit.tpl +++ b/ui/ui/admin-edit.tpl @@ -142,7 +142,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/admin.tpl b/ui/ui/admin.tpl index 4c9a43bd..a88b715e 100644 --- a/ui/ui/admin.tpl +++ b/ui/ui/admin.tpl @@ -63,7 +63,7 @@ class="btn btn-info btn-xs">{Lang::T('Edit')} {if ($_admin['id']) neq ($ds['id'])} + class="btn btn-danger btn-xs" onclick="return ask(this, '{Lang::T('Delete')}?')"> {/if} {$ds['id']} diff --git a/ui/ui/balance-add.tpl b/ui/ui/balance-add.tpl index d6459171..f25e9370 100644 --- a/ui/ui/balance-add.tpl +++ b/ui/ui/balance-add.tpl @@ -46,7 +46,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/balance-edit.tpl b/ui/ui/balance-edit.tpl index 50961333..4dc9a804 100644 --- a/ui/ui/balance-edit.tpl +++ b/ui/ui/balance-edit.tpl @@ -55,7 +55,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/balance.tpl b/ui/ui/balance.tpl index ce2b8b38..6166148a 100644 --- a/ui/ui/balance.tpl +++ b/ui/ui/balance.tpl @@ -41,7 +41,7 @@ {/if} {Lang::T('Edit')} - + {/foreach} diff --git a/ui/ui/bandwidth-add.tpl b/ui/ui/bandwidth-add.tpl index af6b1fee..d0d17667 100644 --- a/ui/ui/bandwidth-add.tpl +++ b/ui/ui/bandwidth-add.tpl @@ -69,7 +69,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/bandwidth-edit.tpl b/ui/ui/bandwidth-edit.tpl index b992cd81..453f8364 100644 --- a/ui/ui/bandwidth-edit.tpl +++ b/ui/ui/bandwidth-edit.tpl @@ -86,7 +86,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 0f5aea1a..322ff693 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -47,7 +47,7 @@ class="btn btn-sm btn-warning">{Lang::T('Edit')} diff --git a/ui/ui/customer/dashboard.tpl b/ui/ui/customer/dashboard.tpl index 7a92e4a5..85c186e9 100644 --- a/ui/ui/customer/dashboard.tpl +++ b/ui/ui/customer/dashboard.tpl @@ -35,7 +35,7 @@
+ onclick="return ask(this, '{Lang::T('Cancel it?')}')"> {Lang::T('Cancel')} @@ -103,11 +103,11 @@ {Lang::moneyFormat($_user['balance'])} {if $_user['auto_renewal'] == 1} {Lang::T('Auto Renewal + onclick="return ask(this, '{Lang::T('Disable auto renewal?')}')">{Lang::T('Auto Renewal On')} {else} {Lang::T('Auto Renewal + onclick="return ask(this, '{Lang::T('Enable auto renewal?')}')">{Lang::T('Auto Renewal Off')} {/if} @@ -272,7 +272,7 @@ Online, Check Status')} {else} {Lang::T('Not Online, Login now?')} {/if} @@ -282,7 +282,7 @@ {if $_bill['status'] == 'on' && $_bill['prepaid'] != 'YES'} {/if} @@ -290,14 +290,14 @@ {if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']} {Lang::T('Extend')} + onclick="return ask(this, '{Text::toHex($_c['extend_confirmation'])}')">{Lang::T('Extend')} {/if} {Lang::T('Recharge')} + onclick="return ask(this, '{Lang::T('Recharge')}?')">{Lang::T('Recharge')} {Lang::T('Sync')} @@ -354,7 +354,7 @@
@@ -383,7 +383,7 @@
diff --git a/ui/ui/customer/footer.tpl b/ui/ui/customer/footer.tpl index 8f4b48ca..7a7129dc 100644 --- a/ui/ui/customer/footer.tpl +++ b/ui/ui/customer/footer.tpl @@ -159,6 +159,18 @@ }); }); + function ask(field, text){ + if (confirm(text)) { + return true; + } else { + setTimeout(() => { + field.innerHTML = field.innerHTML.replace(``, ''); + field.removeAttribute("disabled"); + }, 500); + return false; + } + } + function setCookie(name, value, days) { var expires = ""; if (days) { diff --git a/ui/ui/customer/inbox.tpl b/ui/ui/customer/inbox.tpl index 2e1b451a..870b6d17 100644 --- a/ui/ui/customer/inbox.tpl +++ b/ui/ui/customer/inbox.tpl @@ -31,7 +31,7 @@ {Lang::T("Back")} + onclick="return ask(this, '{Lang::T("Delete")}?')"> {Lang::T("Delete")} {Lang::T("Share")} diff --git a/ui/ui/customer/orderBalance.tpl b/ui/ui/customer/orderBalance.tpl index 4abfddad..82d0844c 100644 --- a/ui/ui/customer/orderBalance.tpl +++ b/ui/ui/customer/orderBalance.tpl @@ -29,7 +29,7 @@ @@ -54,7 +54,7 @@
-
diff --git a/ui/ui/customer/orderPlan.tpl b/ui/ui/customer/orderPlan.tpl index b5253b6d..7b40e425 100644 --- a/ui/ui/customer/orderPlan.tpl +++ b/ui/ui/customer/orderPlan.tpl @@ -50,11 +50,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -107,11 +107,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -165,11 +165,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -221,12 +221,12 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -290,11 +290,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -345,11 +345,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -400,11 +400,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -459,11 +459,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -512,11 +512,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
@@ -565,11 +565,11 @@
{Lang::T('Buy')} {if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']} {Lang::T('Buy for friend')} {/if}
diff --git a/ui/ui/customer/orderView.tpl b/ui/ui/customer/orderView.tpl index 4e7a507a..3ac794ac 100644 --- a/ui/ui/customer/orderView.tpl +++ b/ui/ui/customer/orderView.tpl @@ -144,7 +144,7 @@ {/if} diff --git a/ui/ui/customer/selectGateway.tpl b/ui/ui/customer/selectGateway.tpl index 4266dcea..251cb630 100644 --- a/ui/ui/customer/selectGateway.tpl +++ b/ui/ui/customer/selectGateway.tpl @@ -120,7 +120,7 @@

+ onclick="return ask(this, '{Lang::T("Are You Sure?")}')">{Lang::T('Pay Now')}
{Lang::T('Cancel')}
@@ -153,7 +153,7 @@

+ onclick="return ask(this, '{Lang::T("Are You Sure?")}')">{Lang::T('Pay Now')}
{Lang::T('Cancel')}
diff --git a/ui/ui/customer/sendPlan.tpl b/ui/ui/customer/sendPlan.tpl index d495b16c..bf0c14d2 100644 --- a/ui/ui/customer/sendPlan.tpl +++ b/ui/ui/customer/sendPlan.tpl @@ -53,7 +53,7 @@
diff --git a/ui/ui/customers-add.tpl b/ui/ui/customers-add.tpl index e9df3f7d..813e8ad1 100644 --- a/ui/ui/customers-add.tpl +++ b/ui/ui/customers-add.tpl @@ -204,7 +204,7 @@
-
{Lang::T('Cancel')} diff --git a/ui/ui/customers-edit.tpl b/ui/ui/customers-edit.tpl index 04e8893e..9265d7aa 100644 --- a/ui/ui/customers-edit.tpl +++ b/ui/ui/customers-edit.tpl @@ -243,7 +243,7 @@
- diff --git a/ui/ui/customers-view.tpl b/ui/ui/customers-view.tpl index 6bd06541..57f68376 100644 --- a/ui/ui/customers-view.tpl +++ b/ui/ui/customers-view.tpl @@ -114,7 +114,7 @@
+ onclick="return ask(this, '{Lang::T('Delete')}?')">
{Lang::T('Deactivate')} + onclick="return ask(this, 'This will deactivate Customer Plan, and make it expired')">{Lang::T('Deactivate')}
diff --git a/ui/ui/customers.tpl b/ui/ui/customers.tpl index 6f2a483a..38111418 100644 --- a/ui/ui/customers.tpl +++ b/ui/ui/customers.tpl @@ -18,7 +18,7 @@ {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {/if} diff --git a/ui/ui/deposit.tpl b/ui/ui/deposit.tpl index ba253e2d..6406ce71 100644 --- a/ui/ui/deposit.tpl +++ b/ui/ui/deposit.tpl @@ -46,7 +46,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index 55462816..e698af89 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -203,7 +203,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/hotspot-edit.tpl b/ui/ui/hotspot-edit.tpl index 47199861..f8891cf0 100644 --- a/ui/ui/hotspot-edit.tpl +++ b/ui/ui/hotspot-edit.tpl @@ -278,7 +278,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/hotspot.tpl b/ui/ui/hotspot.tpl index 62a600f5..285f4278 100644 --- a/ui/ui/hotspot.tpl +++ b/ui/ui/hotspot.tpl @@ -6,7 +6,7 @@
{Lang::T('Hotspot Plans')}
@@ -169,7 +169,7 @@ {Lang::T('Edit')} diff --git a/ui/ui/language-add.tpl b/ui/ui/language-add.tpl index 88a65cf4..85d275b0 100644 --- a/ui/ui/language-add.tpl +++ b/ui/ui/language-add.tpl @@ -18,7 +18,7 @@ {/foreach}
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/logs-radius.tpl b/ui/ui/logs-radius.tpl index 44de0667..a435b458 100644 --- a/ui/ui/logs-radius.tpl +++ b/ui/ui/logs-radius.tpl @@ -7,7 +7,7 @@ {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {/if} @@ -37,7 +37,7 @@ {Lang::T('Days')}
+ onclick="return ask(this, 'Clear old logs?')">{Lang::T('Clean Logs')}   diff --git a/ui/ui/logs.tpl b/ui/ui/logs.tpl index 3aba4804..7f69a763 100644 --- a/ui/ui/logs.tpl +++ b/ui/ui/logs.tpl @@ -7,7 +7,7 @@ {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {/if} @@ -37,7 +37,7 @@ {Lang::T('Days')} + onclick="return ask(this, 'Clear old logs?')">{Lang::T('Clean Logs')}   diff --git a/ui/ui/message-bulk.tpl b/ui/ui/message-bulk.tpl index a7626f5b..209e04ca 100644 --- a/ui/ui/message-bulk.tpl +++ b/ui/ui/message-bulk.tpl @@ -77,7 +77,7 @@
- {Lang::T('Cancel')}
diff --git a/ui/ui/message.tpl b/ui/ui/message.tpl index dd7ac21a..10676ea5 100644 --- a/ui/ui/message.tpl +++ b/ui/ui/message.tpl @@ -50,7 +50,7 @@
- + {Lang::T('Cancel')}
diff --git a/ui/ui/page-edit.tpl b/ui/ui/page-edit.tpl index ecc6fabb..0230a25d 100644 --- a/ui/ui/page-edit.tpl +++ b/ui/ui/page-edit.tpl @@ -8,7 +8,7 @@ {if $action!='Voucher'}
{/if} diff --git a/ui/ui/paymentgateway.tpl b/ui/ui/paymentgateway.tpl index bb22196d..bfc86fd3 100644 --- a/ui/ui/paymentgateway.tpl +++ b/ui/ui/paymentgateway.tpl @@ -22,7 +22,7 @@
diff --git a/ui/ui/plan-edit.tpl b/ui/ui/plan-edit.tpl index ee3fa33b..5f2b3e3a 100644 --- a/ui/ui/plan-edit.tpl +++ b/ui/ui/plan-edit.tpl @@ -58,7 +58,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/plan.tpl b/ui/ui/plan.tpl index 518c0289..a90e070c 100644 --- a/ui/ui/plan.tpl +++ b/ui/ui/plan.tpl @@ -7,12 +7,12 @@ {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {* *} {/if} @@ -116,7 +116,7 @@ style="color: black;">{Lang::T('Edit')} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {/if} {if $ds['status']=='off' && $_c['extend_expired']} diff --git a/ui/ui/plugin-manager.tpl b/ui/ui/plugin-manager.tpl index b1051dc1..854be4fa 100644 --- a/ui/ui/plugin-manager.tpl +++ b/ui/ui/plugin-manager.tpl @@ -6,7 +6,7 @@ {/if}
@@ -74,10 +74,10 @@
Delete Source Source diff --git a/ui/ui/pool-edit.tpl b/ui/ui/pool-edit.tpl index a43c15ee..847ce215 100644 --- a/ui/ui/pool-edit.tpl +++ b/ui/ui/pool-edit.tpl @@ -38,7 +38,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pool.tpl b/ui/ui/pool.tpl index c962cfe0..56c76010 100644 --- a/ui/ui/pool.tpl +++ b/ui/ui/pool.tpl @@ -6,7 +6,7 @@
{Lang::T('IP Pool')} @@ -54,7 +54,7 @@ {Lang::T('Edit')} {$ds['id']} diff --git a/ui/ui/port-add.tpl b/ui/ui/port-add.tpl index 1f175fbe..5b32c9f4 100644 --- a/ui/ui/port-add.tpl +++ b/ui/ui/port-add.tpl @@ -37,7 +37,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/port-edit.tpl b/ui/ui/port-edit.tpl index daaba21e..4a499f6e 100644 --- a/ui/ui/port-edit.tpl +++ b/ui/ui/port-edit.tpl @@ -35,7 +35,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/port.tpl b/ui/ui/port.tpl index 77fd2661..d880de4c 100644 --- a/ui/ui/port.tpl +++ b/ui/ui/port.tpl @@ -6,7 +6,7 @@
{Lang::T('Port Pool')} - VPN Tunnels @@ -54,7 +54,7 @@ {Lang::T('Edit')} {$ds['id']} diff --git a/ui/ui/pppoe-add.tpl b/ui/ui/pppoe-add.tpl index ca4ac703..b8ace2b4 100644 --- a/ui/ui/pppoe-add.tpl +++ b/ui/ui/pppoe-add.tpl @@ -147,7 +147,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pppoe-edit.tpl b/ui/ui/pppoe-edit.tpl index c7d8ea9d..ef78a3a7 100644 --- a/ui/ui/pppoe-edit.tpl +++ b/ui/ui/pppoe-edit.tpl @@ -214,7 +214,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pppoe.tpl b/ui/ui/pppoe.tpl index c2efbd31..4a4f5fe4 100644 --- a/ui/ui/pppoe.tpl +++ b/ui/ui/pppoe.tpl @@ -6,7 +6,7 @@
{Lang::T('PPPOE Package')}
@@ -164,7 +164,7 @@ {Lang::T('Edit')} {$ds['id']} diff --git a/ui/ui/radius-nas-add.tpl b/ui/ui/radius-nas-add.tpl index 2d61f586..a38224c8 100644 --- a/ui/ui/radius-nas-add.tpl +++ b/ui/ui/radius-nas-add.tpl @@ -71,7 +71,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/radius-nas-edit.tpl b/ui/ui/radius-nas-edit.tpl index 90f779a9..b4bf3597 100644 --- a/ui/ui/radius-nas-edit.tpl +++ b/ui/ui/radius-nas-edit.tpl @@ -71,7 +71,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/radius-nas.tpl b/ui/ui/radius-nas.tpl index e6598364..f67db0b1 100644 --- a/ui/ui/radius-nas.tpl +++ b/ui/ui/radius-nas.tpl @@ -55,7 +55,7 @@ {Lang::T('Edit')} {$ds['id']} diff --git a/ui/ui/recharge.tpl b/ui/ui/recharge.tpl index e9404dd4..8a3da30c 100644 --- a/ui/ui/recharge.tpl +++ b/ui/ui/recharge.tpl @@ -59,7 +59,7 @@
- {Lang::T('Or')} {Lang::T('Cancel')}
diff --git a/ui/ui/refill.tpl b/ui/ui/refill.tpl index b0e0ac4a..30cb2fe7 100644 --- a/ui/ui/refill.tpl +++ b/ui/ui/refill.tpl @@ -24,7 +24,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/routers-add.tpl b/ui/ui/routers-add.tpl index 1239c757..e2f09d07 100644 --- a/ui/ui/routers-add.tpl +++ b/ui/ui/routers-add.tpl @@ -61,7 +61,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/routers-edit.tpl b/ui/ui/routers-edit.tpl index 515edf52..0d0e94c8 100644 --- a/ui/ui/routers-edit.tpl +++ b/ui/ui/routers-edit.tpl @@ -78,7 +78,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/routers.tpl b/ui/ui/routers.tpl index 58b63aef..5ea6722c 100644 --- a/ui/ui/routers.tpl +++ b/ui/ui/routers.tpl @@ -85,7 +85,7 @@ {Lang::T('Edit')} {$ds['id']} diff --git a/ui/ui/sections/footer.tpl b/ui/ui/sections/footer.tpl index 6059d11c..e183859e 100644 --- a/ui/ui/sections/footer.tpl +++ b/ui/ui/sections/footer.tpl @@ -88,9 +88,9 @@ $(this).html( `` ); - // setTimeout(() => { - // $(this).prop("disabled", true); - // }, 100); + setTimeout(() => { + $(this).prop("disabled", true); + }, 100); }, false); } else { if (el.attachEvent) { // IE before version 9 @@ -98,9 +98,9 @@ $(this).html( `` ); - // setTimeout(() => { - // $(this).prop("disabled", true); - // }, 100); + setTimeout(() => { + $(this).prop("disabled", true); + }, 100); }); } } @@ -112,6 +112,18 @@ }, 500); }); + function ask(field, text){ + if (confirm(text)) { + return true; + } else { + setTimeout(() => { + field.innerHTML = field.innerHTML.replace(``, ''); + field.removeAttribute("disabled"); + }, 500); + return false; + } + } + function apiGetText(){ var el = listAttApi[posAttApi]; $.get(el.getAttribute('api-get-text'), function(data) { diff --git a/ui/ui/voucher-add.tpl b/ui/ui/voucher-add.tpl index 4e579681..232ebd6f 100644 --- a/ui/ui/voucher-add.tpl +++ b/ui/ui/voucher-add.tpl @@ -73,7 +73,7 @@
- +
diff --git a/ui/ui/voucher.tpl b/ui/ui/voucher.tpl index abf652f0..f11c552e 100644 --- a/ui/ui/voucher.tpl +++ b/ui/ui/voucher.tpl @@ -19,7 +19,7 @@ {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} @@ -133,7 +133,7 @@ {/if} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {/if} diff --git a/ui/ui/vpn-add.tpl b/ui/ui/vpn-add.tpl index 4fadfbdc..7f411edc 100644 --- a/ui/ui/vpn-add.tpl +++ b/ui/ui/vpn-add.tpl @@ -134,7 +134,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/vpn-edit.tpl b/ui/ui/vpn-edit.tpl index ab80cf18..796adfb9 100644 --- a/ui/ui/vpn-edit.tpl +++ b/ui/ui/vpn-edit.tpl @@ -214,7 +214,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/vpn.tpl b/ui/ui/vpn.tpl index 45f317f9..f1724d8d 100644 --- a/ui/ui/vpn.tpl +++ b/ui/ui/vpn.tpl @@ -6,7 +6,7 @@
{Lang::T('VPN Package')}
@@ -161,7 +161,7 @@ {Lang::T('Edit')} {$ds['id']}