mirror of
https://github.com/itsdave-de/msp.git
synced 2025-05-06 15:35:12 +02:00
Display Password
This commit is contained in:
parent
ff1b5b4a8b
commit
70b1e373d1
@ -3,9 +3,20 @@
|
||||
|
||||
frappe.ui.form.on('IT User Account', {
|
||||
refresh: function(frm) {
|
||||
frm.add_custom_button('Copy PW', () => frm.trigger('get_pw'));
|
||||
frm.add_custom_button('Generate PW', () => frm.trigger('generate_new_pw'));
|
||||
|
||||
frm.add_custom_button('Copy PW', () => frm.trigger('get_pw'),"Actions");
|
||||
frm.add_custom_button('Show PW', () => frm.trigger('show_pw'),"Actions");
|
||||
frm.add_custom_button('Generate PW', () => frm.trigger('generate_new_pw'),"Actions");
|
||||
|
||||
},
|
||||
show_pw: function(frm) {
|
||||
frm.call('copy_pw', {
|
||||
'user_agent': navigator.userAgent,
|
||||
'platform': navigator.platform,
|
||||
},
|
||||
(r) => {
|
||||
frappe.msgprint(r.message)
|
||||
}
|
||||
);
|
||||
},
|
||||
get_pw: function(frm) {
|
||||
frm.call('copy_pw', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user