Module: check_mk
Branch: master
Commit: 3d9fc68cbe9724385e7d14bb502da374524bd423
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d9fc68cbe9724…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 17 10:30:42 2017 +0100
Better text for password cleartext warning
Also avoid copy&paste here
Change-Id: I4fe3bf52827c4cf55558eafb41671a473effc409
---
web/htdocs/valuespec.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index c9dff2a..df33621 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3815,9 +3815,13 @@ class Password(TextAscii):
kwargs["autocomplete"] = "new-password"
html.password_input(varprefix, str(value), **kwargs)
+
+
+ def password_plaintext_warning(self):
if self._is_stored_plain:
- html.span(_("<br>Please note that this password needs to
be<br>"
- "stored in plain text on the Check_MK server."))
+ html.span(_("<br>Please note that Check_MK needs this password in
clear"
+ "<br>text during normal operation and thus stores it
unencrypted"
+ "<br>on the Check_MK server."))
def value_to_text(self, value):
@@ -3845,9 +3849,8 @@ class PasswordSpec(Password):
if self._hidden:
html.icon_button("#", _(u"Show/Hide password"),
"showhide",
onclick="vs_toggle_hidden(this);")
- if self._is_stored_plain:
- html.span(_("<br>Please note that this password needs to
be<br>"
- "stored in plain text on the Check_MK server."))
+
+ self.password_plaintext_warning()