From c13e1838d7afec30fe1b018ccd9aff7c9bd0db70 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Thu, 25 Nov 2021 17:57:07 +0530 Subject: [PATCH] fix: module load issue, tour description and save field overlay --- frappe/core/form_tour/doctype/doctype.json | 11 ++++++----- frappe/public/js/frappe/form/form_tour.js | 3 ++- frappe/utils/install.py | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frappe/core/form_tour/doctype/doctype.json b/frappe/core/form_tour/doctype/doctype.json index e38b9640cc..391d3ecf40 100644 --- a/frappe/core/form_tour/doctype/doctype.json +++ b/frappe/core/form_tour/doctype/doctype.json @@ -6,7 +6,7 @@ "idx": 0, "include_name_field": 1, "is_standard": 1, - "modified": "2021-11-24 17:25:18.317075", + "modified": "2021-11-25 17:03:01.646360", "modified_by": "Administrator", "module": "Core", "name": "Doctype", @@ -15,7 +15,7 @@ "save_on_complete": 1, "steps": [ { - "description": "Select a Module to which this Doctype would belong", + "description": "Select a Module to which this DocType would belong", "field": "", "fieldname": "module", "fieldtype": "Link", @@ -27,19 +27,20 @@ "title": "Module" }, { - "description": "Check this to make the Docytpe as Custom", + "description": "Check this to make the DocType as Custom", "field": "", "fieldname": "custom", "fieldtype": "Check", - "has_next_condition": 0, + "has_next_condition": 1, "is_table_field": 0, "label": "Custom?", + "next_step_condition": "eval: doc.custom", "parent_field": "", "position": "Left", "title": "Custom " }, { - "description": "Add fields to this Custom Doctype", + "description": "A Field (or a docfield) defines a property of a DocType. You can define the column name, label, datatype and more for DocFields. For instance, a ToDo doctype has fields description, status and priority. These ultimately become columns in the database table tabToDo.", "field": "", "fieldname": "fields", "fieldtype": "Table", diff --git a/frappe/public/js/frappe/form/form_tour.js b/frappe/public/js/frappe/form/form_tour.js index 9b93d160ed..84c7afdef4 100644 --- a/frappe/public/js/frappe/form/form_tour.js +++ b/frappe/public/js/frappe/form/form_tour.js @@ -18,6 +18,7 @@ frappe.ui.form.FormTour = class FormTour { // if last step is to save, then attach a listener to save button if (step.options.is_save_step) { $(step.options.element).one('click', () => this.driver.reset()); + this.driver.overlay.refresh(); } // focus on input @@ -54,7 +55,7 @@ frappe.ui.form.FormTour = class FormTour { include_name_field() { const name_step = { - "description": "Enter a name", + "description": `Enter a name for this ${this.frm.doctype}`, "fieldname": "__newname", "title": "Name", "position": "right", diff --git a/frappe/utils/install.py b/frappe/utils/install.py index 1cc94a68d6..2bb58a6b4c 100644 --- a/frappe/utils/install.py +++ b/frappe/utils/install.py @@ -5,6 +5,8 @@ import getpass from frappe.utils.password import update_password def before_install(): + frappe.reload_doc("desk", "doctype", "form_tour_step") + frappe.reload_doc("desk", "doctype", "form_tour") frappe.reload_doc("core", "doctype", "docfield") frappe.reload_doc("core", "doctype", "docperm") frappe.reload_doc("core", "doctype", "doctype_action")