Skip to content

Commit

Permalink
Merge pull request frappe#26710 from marination/block-rename-lang
Browse files Browse the repository at this point in the history
fix: Avoid renaming language or changing title manually
  • Loading branch information
ankush authored Jun 11, 2024
2 parents a65c621 + f58b288 commit c146ea2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions frappe/core/doctype/language/language.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:language_code",
"creation": "2014-08-22 16:12:17.249590",
"doctype": "DocType",
Expand All @@ -27,7 +26,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "Language Name",
"reqd": 1
"reqd": 1,
"set_only_once": 1
},
{
"fieldname": "flag",
Expand All @@ -51,7 +51,7 @@
"icon": "fa fa-globe",
"in_create": 1,
"links": [],
"modified": "2024-03-23 16:03:28.477169",
"modified": "2024-06-06 18:25:01.010821",
"modified_by": "Administrator",
"module": "Core",
"name": "Language",
Expand Down
3 changes: 2 additions & 1 deletion frappe/public/js/frappe/form/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ frappe.ui.form.Toolbar = class Toolbar {
this.frm.perm[0].write &&
!this.frm.doc.__islocal &&
doc_field.fieldtype === "Data" &&
!doc_field.read_only
!doc_field.read_only &&
!doc_field.set_only_once
) {
return true;
} else {
Expand Down

0 comments on commit c146ea2

Please sign in to comment.