mirror of
				https://github.com/itsdave-de/msp.git
				synced 2025-10-30 08:57:09 -03:00 
			
		
		
		
	Display Password
This commit is contained in:
		
							parent
							
								
									ff1b5b4a8b
								
							
						
					
					
						commit
						70b1e373d1
					
				| @ -3,10 +3,21 @@ | |||||||
| 
 | 
 | ||||||
| frappe.ui.form.on('IT User Account', { | frappe.ui.form.on('IT User Account', { | ||||||
| 	refresh: function(frm) { | 	refresh: function(frm) { | ||||||
|         frm.add_custom_button('Copy PW', () => frm.trigger('get_pw')); |         frm.add_custom_button('Copy PW', () => frm.trigger('get_pw'),"Actions"); | ||||||
|         frm.add_custom_button('Generate PW', () => frm.trigger('generate_new_pw')); |         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) { |     get_pw: function(frm) { | ||||||
|         frm.call('copy_pw', { |         frm.call('copy_pw', { | ||||||
|             'user_agent': navigator.userAgent, |             'user_agent': navigator.userAgent, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user