From 925e5922eb4547c76c0dc4bbee0b41e9ddd1132f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 8 Aug 2017 14:35:07 +0530 Subject: [PATCH] [minor] cleaned code from user.js --- frappe/core/doctype/user/user.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/frappe/core/doctype/user/user.js b/frappe/core/doctype/user/user.js index 601c7d27ce..5409b569c7 100644 --- a/frappe/core/doctype/user/user.js +++ b/frappe/core/doctype/user/user.js @@ -77,7 +77,7 @@ frappe.ui.form.on('User', { } }) }) - + frm.add_custom_button(__("Reset OTP Secret"), function() { frappe.call({ method: "frappe.core.doctype.user.user.reset_otp_secret", @@ -121,27 +121,6 @@ frappe.ui.form.on('User', { cur_frm.dirty(); } - // frappe.call({ - // method: "get_2fa_params", - // doc:frm.doc, - // callback: function(r) { - // if (r.message){ - // frm.toggle_display('two_factor_method', r.message.show_method_field == true); - // if (r.message.restrict_method){ - // $("select[data-fieldname=two_factor_method] > option").each(function() { - // if ($(this).val() != r.message.restrict_method){ - // $(this).attr('disabled',''); - // } else { - // $(this).removeAttr('disabled') - // } - // }); - //frm.set_df_property('two_factor_method', 'options', [r.message.restrict_method]); - //frm.set_value('two_factor_method',r.message.restrict_method) - //frm.refresh_field('two_factor_method'); - // } - // } - // } - // }); }, validate: function(frm) { if(frm.roles_editor) {