mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui-css: improve radio,checkbox keyboard support and color
checkboxes and radio buttons: - do not change color on hover when disabled - are focusable and checkable be keyboard again. This uses a little trick where the real checkbox is hidden under the artificial checkbox. That way it has the same position and therefore it works even in containers with overflow set. https://fedorahosted.org/freeipa/ticket/4217 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
This commit is contained in:
@@ -37,10 +37,10 @@ ZONE_DATA = {
|
||||
('textbox', 'idnsname', ZONE_PKEY),
|
||||
('textbox', 'idnssoamname', 'ns'),
|
||||
('textbox', 'ip_address', '192.168.1.1'),
|
||||
('checkbox', 'force', ''),
|
||||
('checkbox', 'force', 'checked'),
|
||||
],
|
||||
'mod': [
|
||||
('checkbox', 'idnsallowsyncptr', ''),
|
||||
('checkbox', 'idnsallowsyncptr', 'checked'),
|
||||
],
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ RECORD_MOD_DATA = {
|
||||
|
||||
CONFIG_MOD_DATA = {
|
||||
'mod': [
|
||||
('checkbox', 'idnsallowsyncptr', ''),
|
||||
('checkbox', 'idnsallowsyncptr', 'checked'),
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -61,14 +61,14 @@ class host_tasks(UI_driver):
|
||||
]
|
||||
if ip:
|
||||
add_data.append(('textbox', 'ip_address', ip))
|
||||
add_data.append(('checkbox', 'force', ''))
|
||||
add_data.append(('checkbox', 'force', None))
|
||||
del_data = [
|
||||
('checkbox', 'updatedns', '')
|
||||
('checkbox', 'updatedns', None)
|
||||
]
|
||||
else:
|
||||
add_data = [
|
||||
('textbox', 'fqdn', '%s.%s' % (host, domain)),
|
||||
('checkbox', 'force', ''),
|
||||
('checkbox', 'force', None),
|
||||
]
|
||||
del_data = None
|
||||
|
||||
@@ -204,7 +204,7 @@ class test_host(host_tasks):
|
||||
http://www.freeipa.org/page/V3/Kerberos_Flags
|
||||
"""
|
||||
name = 'ipakrbokasdelegate'
|
||||
mod = {'mod': [('checkbox', name, '')]}
|
||||
mod = {'mod': [('checkbox', name, None)]}
|
||||
checked = ['checked']
|
||||
|
||||
self.init_app()
|
||||
|
||||
@@ -41,7 +41,7 @@ class sevice_tasks(UI_driver):
|
||||
('combobox', 'host', host)
|
||||
],
|
||||
'mod': [
|
||||
('checkbox', 'ipakrbokasdelegate', ''),
|
||||
('checkbox', 'ipakrbokasdelegate', None),
|
||||
],
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ class test_service(sevice_tasks):
|
||||
"""
|
||||
pkey = self.get_http_pkey()
|
||||
name = 'ipakrbokasdelegate'
|
||||
mod = {'mod': [('checkbox', name, '')]}
|
||||
mod = {'mod': [('checkbox', name, None)]}
|
||||
checked = ['checked']
|
||||
|
||||
self.init_app()
|
||||
|
||||
@@ -1005,7 +1005,7 @@ class UI_driver(object):
|
||||
elif widget_type == 'radio':
|
||||
self.check_option(key, val, parent)
|
||||
elif widget_type == 'checkbox':
|
||||
self.check_option(key, parent=parent)
|
||||
self.check_option(key, val, parent=parent)
|
||||
elif widget_type == 'selectbox':
|
||||
self.select('select[name=%s]' % key, val, parent)
|
||||
elif widget_type == 'combobox':
|
||||
|
||||
Reference in New Issue
Block a user