webui: hbactest: add tooltips to 'enabled' and 'disabled' checkboxes

"Include enabled" and "Include disabled" checkboxes on "Rules" tab
of HBAC Test Web UI page don't have any descriptions. It is not
clear what they do from only the labels.

This patch adds tooltips with metadata doc text of respected API
options. I.e. in practice it adds the same as CLI help when user
hovers over the checkbox label.

  --enabled        Include all enabled IPA rules into test [default]
  --disabled       Include all disabled IPA rules into test

Reviewed-By: Felipe Barreto <fbarreto@redhat.com>
This commit is contained in:
Petr Vobornik 2018-02-15 21:17:25 +01:00 committed by Felipe Barreto
parent efaa48e455
commit f7b2342426

View File

@ -441,7 +441,8 @@ IPA.hbac.test_rules_facet = function(spec) {
$('<label/>', { $('<label/>', {
'for': 'hbactest-rules-include-enabled', 'for': 'hbactest-rules-include-enabled',
text: text.get('@i18n:objects.hbactest.include_enabled') text: text.get('@i18n:objects.hbactest.include_enabled'),
title: text.get('@mc-opt:hbactest:enabled:doc')
}).appendTo(header); }).appendTo(header);
that.disabled = $('<input/>', { that.disabled = $('<input/>', {
@ -452,7 +453,8 @@ IPA.hbac.test_rules_facet = function(spec) {
$('<label/>', { $('<label/>', {
'for': 'hbactest-rules-include-disabled', 'for': 'hbactest-rules-include-disabled',
text: text.get('@i18n:objects.hbactest.include_disabled') text: text.get('@i18n:objects.hbactest.include_disabled'),
title: text.get('@mc-opt:hbactest:disabled:doc')
}).appendTo(header); }).appendTo(header);
var content = $('<div/>', { var content = $('<div/>', {