// Copyright (c) 2022, JINGROW
// For license information, please see license.txt

jingrow.ui.form.on('Malware Scan', {
	refresh: function (frm) {
		if (['Installed', 'Failure', 'Success'].includes(frm.pg.status)) {
			frm.add_custom_button(__('Start'), () => {
				jingrow.confirm('Are you sure you want to scan?', () =>
					frm.call('start'),
				);
			});
		}
	},
});
