浏览代码

[minor] cleaned code from user.js

version-14
Rushabh Mehta 8 年前
父节点
当前提交
925e5922eb
共有 1 个文件被更改,包括 1 次插入22 次删除
  1. +1
    -22
      frappe/core/doctype/user/user.js

+ 1
- 22
frappe/core/doctype/user/user.js 查看文件

@@ -77,7 +77,7 @@ frappe.ui.form.on('User', {
} }
}) })
}) })
frm.add_custom_button(__("Reset OTP Secret"), function() { frm.add_custom_button(__("Reset OTP Secret"), function() {
frappe.call({ frappe.call({
method: "frappe.core.doctype.user.user.reset_otp_secret", method: "frappe.core.doctype.user.user.reset_otp_secret",
@@ -121,27 +121,6 @@ frappe.ui.form.on('User', {
cur_frm.dirty(); 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) { validate: function(frm) {
if(frm.roles_editor) { if(frm.roles_editor) {


正在加载...
取消
保存