Development
This commit is contained in:
parent
d55db32667
commit
4071d2bcbb
2 changed files with 23 additions and 2 deletions
|
|
@ -455,6 +455,11 @@ def collect_form_originals(items, tokens):
|
||||||
value = apply_tokens(item.get('value', ''), tokens)
|
value = apply_tokens(item.get('value', ''), tokens)
|
||||||
if input_type == 'checkbox':
|
if input_type == 'checkbox':
|
||||||
result[name] = '1' if value.lower() in ('true', '1', 'yes') else '0'
|
result[name] = '1' if value.lower() in ('true', '1', 'yes') else '0'
|
||||||
|
elif input_type == 'checkbox_group':
|
||||||
|
try:
|
||||||
|
result[name] = json.loads(value) if value else []
|
||||||
|
except Exception:
|
||||||
|
result[name] = []
|
||||||
elif input_type == 'select' and not value:
|
elif input_type == 'select' and not value:
|
||||||
try:
|
try:
|
||||||
opts = json.loads(apply_tokens(item.get('options', '[]'), tokens))
|
opts = json.loads(apply_tokens(item.get('options', '[]'), tokens))
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,10 @@
|
||||||
"action": "/action/radius/options_save",
|
"action": "/action/radius/options_save",
|
||||||
"method": "post",
|
"method": "post",
|
||||||
"text": "Save"
|
"text": "Save"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "button_cancel",
|
||||||
|
"text": "Cancel"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +108,7 @@
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"label": "Apply DEFAULT Rule To",
|
"label": "Which RADIUS Clients (authenticators) may apply the DEFAULT rule to unknown devices?",
|
||||||
"name": "apply_to",
|
"name": "apply_to",
|
||||||
"input_type": "select",
|
"input_type": "select",
|
||||||
"value": "%RADIUS_APPLY_TO%",
|
"value": "%RADIUS_APPLY_TO%",
|
||||||
|
|
@ -113,7 +117,7 @@
|
||||||
{"value": "wireless", "label": "Wireless authenticators only (NAS-Port-Type = Wireless-802.11)"},
|
{"value": "wireless", "label": "Wireless authenticators only (NAS-Port-Type = Wireless-802.11)"},
|
||||||
{"value": "huntgroup", "label": "Wireless authenticators only (AP huntgroup by IP)"}
|
{"value": "huntgroup", "label": "Wireless authenticators only (AP huntgroup by IP)"}
|
||||||
],
|
],
|
||||||
"hint": "\"Wireless authenticators only\" means that unknown wired devices will be rejected by RADIUS, rather than receive RADIUS authorization for placement onto the fallback VLAN. Your managed switch may have additional policy rules for handling of devices rejected by RADIUS."
|
"hint": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
|
|
@ -132,6 +136,10 @@
|
||||||
"action": "/action/radius/default_rule_save",
|
"action": "/action/radius/default_rule_save",
|
||||||
"method": "post",
|
"method": "post",
|
||||||
"text": "Save"
|
"text": "Save"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "button_cancel",
|
||||||
|
"text": "Cancel"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -171,6 +179,10 @@
|
||||||
{
|
{
|
||||||
"type": "button_primary",
|
"type": "button_primary",
|
||||||
"text": "Save"
|
"text": "Save"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "button_cancel",
|
||||||
|
"text": "Cancel"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -219,6 +231,10 @@
|
||||||
{
|
{
|
||||||
"type": "button_primary",
|
"type": "button_primary",
|
||||||
"text": "Save"
|
"text": "Save"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "button_cancel",
|
||||||
|
"text": "Cancel"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue