From a4f410fa0ebdd21b97b6c5b943dfa5197440e7d1 Mon Sep 17 00:00:00 2001 From: Ashish Baravaliya Date: Tue, 2 Jan 2024 20:09:50 -0500 Subject: [PATCH] fix: hide password hint and progress --- .../autoinscribe_settings.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/autoinscribe/autoinscribe/doctype/autoinscribe_settings/autoinscribe_settings.js b/autoinscribe/autoinscribe/doctype/autoinscribe_settings/autoinscribe_settings.js index 5c9dd7d..c4e5766 100644 --- a/autoinscribe/autoinscribe/doctype/autoinscribe_settings/autoinscribe_settings.js +++ b/autoinscribe/autoinscribe/doctype/autoinscribe_settings/autoinscribe_settings.js @@ -1,8 +1,16 @@ // Copyright (c) 2023, RedSoft Solutions Pvt. Ltd. and contributors // For license information, please see license.txt -// frappe.ui.form.on("AutoInscribe Settings", { -// refresh(frm) { +frappe.ui.form.on("AutoInscribe Settings", { + refresh: function (frm) { + hidePasswordStrengthElements(frm); + }, +}); -// }, -// }); +function hidePasswordStrengthElements(frm) { + $.each(frm.fields_dict, function (fieldname, field) { + if (field.df && field.df.fieldtype === "Password") { + field.$wrapper.find(".password-strength-indicator, .help-box").hide(); + } + }); +}