Module: check_mk
Branch: master
Commit: 4d7f0951414d0214d955f4fd44632191df876c25
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d7f0951414d02…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 1 20:38:43 2018 +0100
Fixed disabling checkboxes after htmllib refactoring in 1.6 code base
Change-Id: Icf4df4c656b19e20da6e6023e26879ed75407a60
---
cmk/gui/plugins/wato/utils/__init__.py | 6 +++---
cmk/gui/wato/pages/services.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmk/gui/plugins/wato/utils/__init__.py
b/cmk/gui/plugins/wato/utils/__init__.py
index e58a91c..a0d77cd 100644
--- a/cmk/gui/plugins/wato/utils/__init__.py
+++ b/cmk/gui/plugins/wato/utils/__init__.py
@@ -1522,13 +1522,13 @@ def configure_attributes(new,
checkbox_code = None
elif force_entry:
checkbox_code = html.render_checkbox(
- "ignored_" + checkbox_name,
add_attr=["disabled"])
+ "ignored_" + checkbox_name, disabled="disabled")
checkbox_code += html.render_hidden_field(checkbox_name, "on")
else:
- add_attr = ["disabled"] if disabled else []
onclick = "wato_fix_visibility(); wato_toggle_attribute(this,
'%s');" % attrname
+ checkbox_kwargs = {"disabled": "disabled"} if
disabled else {}
checkbox_code = html.render_checkbox(
- checkbox_name, active, onclick=onclick, add_attr=add_attr)
+ checkbox_name, active, onclick=onclick, **checkbox_kwargs)
forms.section(_u(attr.title()), checkbox=checkbox_code,
section_id="attr_" + attrname)
html.help(attr.help())
diff --git a/cmk/gui/wato/pages/services.py b/cmk/gui/wato/pages/services.py
index faabd2a..df9d2a3 100644
--- a/cmk/gui/wato/pages/services.py
+++ b/cmk/gui/wato/pages/services.py
@@ -578,7 +578,7 @@ class ModeDiscovery(WatoMode):
sortable=False,
css="checkbox")
html.checkbox(self._checkbox_name(check_type, item),
- True, add_attr = ['title="%s"' %
_('Temporarily ignore this service')])
+ True, title=_("Temporarily ignore this service"))
def _bulk_action_colspan(self):
colspan = 5