mirror of
https://github.com/CFC-Servers/cfc_cl_http_whitelist.git
synced 2025-03-04 03:03:18 -05:00
hotfix save button for config
This commit is contained in:
parent
13e6c8ef80
commit
4733bf1de8
@ -30,7 +30,7 @@ local function populatePanel( form )
|
||||
form:AddItem( list )
|
||||
|
||||
for k, v in pairs( CFCHTTP.config.addresses ) do
|
||||
list:AddLine( k, ( v and v.allowed ) and "yes" or "no" )
|
||||
list:AddLine( k, (v and v.allowed) and "yes" or "no" )
|
||||
end
|
||||
|
||||
local textEntry, _ = form:TextEntry( "Address" )
|
||||
@ -67,13 +67,13 @@ local function populatePanel( form )
|
||||
|
||||
local save = form:Button( "Save" )
|
||||
save.DoClick = function()
|
||||
local conf = CFCHTTP.copyConfig( CFCHTTP.config )
|
||||
local conf = CFCHTTP.CopyConfig( CFCHTTP.config )
|
||||
for addr, options in pairs( conf.addresses ) do
|
||||
if not options._edited then
|
||||
conf.addresses[addr] = nil
|
||||
end
|
||||
end
|
||||
CFCHTTP.saveFileConfig( {
|
||||
CFCHTTP.SaveFileConfig( {
|
||||
version = "1",
|
||||
addresses = conf.addresses
|
||||
} )
|
||||
|
Loading…
Reference in New Issue
Block a user