Browse Source

Merge pull request #17755 from frappe/mergify/bp/version-14-hotfix/pr-17753

version-14
Suraj Shetty 2 years ago
committed by GitHub
parent
commit
9a34ef5556
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      cypress/integration/control_data.js
  2. +4
    -4
      frappe/public/js/frappe/doctype/index.js

+ 1
- 1
cypress/integration/control_data.js View File

@@ -42,7 +42,7 @@ context("Data Control", () => {
cy.visit(`/app/doctype/User`);
cy.get(
'[data-fieldname="fields"] .grid-row[data-idx="2"] [data-fieldname="fieldtype"] .static-area'
).should("have.text", "🔵 Section Break");
).should("have.text", "Section Break");
});

it('Verifying data control by inputting different patterns for "Name" field', () => {


+ 4
- 4
frappe/public/js/frappe/doctype/index.js View File

@@ -11,12 +11,12 @@ frappe.model.DocTypeController = class DocTypeController extends frappe.ui.form.
this.frm.doctype === "DocType" ? "DocField" : "Customize Form Field"
].fieldtype.formatter = (value) => {
const prefix = {
"Tab Break": "🔴",
"Section Break": "🔵",
"Column Break": "🟡",
"Tab Break": "--red-600",
"Section Break": "--blue-600",
"Column Break": "--yellow-600",
};
if (prefix[value]) {
value = prefix[value] + " " + value;
value = `<span class="bold" style="color: var(${prefix[value]})">${value}</span>`;
}
return value;
};


Loading…
Cancel
Save