Skip to content

Commit

Permalink
prettier: amended spacing as per 'prettier' in precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
karanwilson committed May 11, 2024
1 parent 4cfc8bf commit aded64e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 7 additions & 7 deletions frappe/custom/doctype/customize_form/customize_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,14 @@ frappe.ui.form.on("Customize Form Field", {
},
});

let parenttype, parent; // used in the form events for the child tables: links, actions and states
let parenttype, parent; // used in the form events for the child tables: links, actions and states

// can't delete standard links
frappe.ui.form.on("DocType Link", {
before_links_remove: function (frm, doctype, name) {
let row = frappe.get_doc(doctype, name);
parenttype = row.parenttype; // used in the event links_remove
parent = row.parent; // used in the event links_remove
parenttype = row.parenttype; // used in the event links_remove
parent = row.parent; // used in the event links_remove
if (!(row.custom || row.__islocal)) {
frappe.msgprint(__("Cannot delete standard link. You can hide it if you want"));
throw "cannot delete standard link";
Expand All @@ -363,8 +363,8 @@ frappe.ui.form.on("DocType Link", {
frappe.ui.form.on("DocType Action", {
before_actions_remove: function (frm, doctype, name) {
let row = frappe.get_doc(doctype, name);
parenttype = row.parenttype; // used in the event actions_remove
parent = row.parent; // used in the event actions_remove
parenttype = row.parenttype; // used in the event actions_remove
parent = row.parent; // used in the event actions_remove
if (!(row.custom || row.__islocal)) {
frappe.msgprint(__("Cannot delete standard action. You can hide it if you want"));
throw "cannot delete standard action";
Expand All @@ -385,8 +385,8 @@ frappe.ui.form.on("DocType Action", {
frappe.ui.form.on("DocType State", {
before_states_remove: function (frm, doctype, name) {
let row = frappe.get_doc(doctype, name);
parenttype = row.parenttype; // used in the event states_remove
parent = row.parent; // used in the event states_remove
parenttype = row.parenttype; // used in the event states_remove
parent = row.parent; // used in the event states_remove
if (!(row.custom || row.__islocal)) {
frappe.msgprint(__("Cannot delete standard document state."));
throw "cannot delete standard document state";
Expand Down
3 changes: 1 addition & 2 deletions frappe/public/js/frappe/form/grid_row.js
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,7 @@ export default class GridRow {
if (field) {
// the below if statement is added to factor in the exception when this.doc is undefined -
// - after row removals via customize_form.js on links, actions and states child-tables
if (this.doc)
field.docname = this.doc.name;
if (this.doc) field.docname = this.doc.name;
field.refresh();
}

Expand Down

0 comments on commit aded64e

Please sign in to comment.