Skip to content

Commit

Permalink
refactor(revisions): make content field read only
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Jul 22, 2023
1 parent 1d62da7 commit e9b6f46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions wiki/wiki/doctype/wiki_page_revision/wiki_page_revision.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// For license information, please see license.txt

frappe.ui.form.on("Wiki Page Revision", {
// refresh: function(frm) {
// }
refresh: function (frm) {
$('[data-fieldname="content"] pre')
.parent(".like-disabled-input")
.html(frm.doc.content);
},
});
7 changes: 4 additions & 3 deletions wiki/wiki/doctype/wiki_page_revision/wiki_page_revision.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
},
{
"fieldname": "content",
"fieldtype": "HTML Editor",
"label": "Content"
"fieldtype": "Code",
"label": "Content",
"read_only": 1
},
{
"fieldname": "raised_by",
Expand Down Expand Up @@ -55,7 +56,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-07-23 00:08:32.210599",
"modified": "2023-07-23 00:22:44.919982",
"modified_by": "Administrator",
"module": "Wiki",
"name": "Wiki Page Revision",
Expand Down

0 comments on commit e9b6f46

Please sign in to comment.