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

jingrow.ui.form.on("Console Log", {
	refresh: function (frm) {
		frm.add_custom_button(__("Re-Run in Console"), () => {
			window.localStorage.setItem("system_console_code", frm.pg.script);
			window.localStorage.setItem("system_console_type", frm.pg.type);
			jingrow.set_route("Form", "System Console");
		});
	},
});
