@@ -261,26 +261,28 @@ local function loadAclList(aclmode, action)
261
261
if aclmode == "unlock" or aclmode == "disabled" then
262
262
whitelistclass["group"].style = "display:none;"
263
263
end
264
- if #acl_whitelist_data < 1 and action ~= "POST" then
265
- whitelistclass["group"].style = "display:none;"
266
- whitelistclass ["span"] = {id = "Address_list_Whitelistclass"}
267
- html[#html+1] = ui_helper.createLabel("", T"MAC Address list is empty", whitelistclass, nil)
268
- acl_columns[1].header=""
269
- end
270
- html[#html+1] = ui_helper.createTable(acl_columns, acl_whitelist_data, acl_whitelist_options, whitelistclass, acl_whitelist_helpmsg)
264
+
271
265
local blacklistclass = {
272
266
group = {
273
267
class = "monitor-acl_mode monitor-unlock"
274
268
}
275
269
}
276
- if #acl_blacklist_data < 1 and action ~= "POST" then
277
- blacklistclass["group"].style = "display:none;"
278
- blacklistclass ["span"] = {id = "Address_list_Blacklistclass"}
279
- html[#html+1] = ui_helper.createLabel("", T"MAC Address list is empty", blacklistclass, nil)
280
- acl_columns[1].header=""
281
- else
282
- acl_columns[1].header = format("<span style=\"font-weight:normal;\">%s</span>", T"MAC Address")
270
+
271
+ if (#acl_whitelist_data < 1 or #acl_blacklist_data < 1) and action ~= "POST" then
272
+ acl_columns[1].header = ""
273
+ if aclmode == "unlock" then
274
+ whitelistclass["group"].style = "display:none;"
275
+ whitelistclass ["span"] = {id = "Address_list_Whitelistclass"}
276
+ html[#html+1] = ui_helper.createLabel("", T"MAC Address list is empty", whitelistclass, nil)
277
+ elseif aclmode == "lock" then
278
+ blacklistclass["group"].style = "display:none;"
279
+ blacklistclass ["span"] = {id = "Address_list_Blacklistclass"}
280
+ html[#html+1] = ui_helper.createLabel("", T"MAC Address list is empty", blacklistclass, nil)
281
+ end
283
282
end
283
+
284
+ html[#html+1] = ui_helper.createTable(acl_columns, acl_whitelist_data, acl_whitelist_options, whitelistclass, acl_whitelist_helpmsg)
285
+
284
286
if aclmode == "lock" or aclmode == "register" or aclmode == "disabled" then
285
287
blacklistclass["group"].style = "display:none;"
286
288
end
0 commit comments