浏览代码

[Fix] Trigger dirty when checkbox value is changed (#4541)

* trigger save on uncheck

* Update form.js

the reason for this condition was text editor
version-14
Shreya Shah 7 年前
committed by Faris Ansari
父节点
当前提交
ce066019ff
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      frappe/public/js/legacy/form.js

+ 3
- 2
frappe/public/js/legacy/form.js 查看文件

@@ -195,9 +195,10 @@ _f.Frm.prototype.watch_model_updates = function() {
frappe.model.on(me.doctype, "*", function(fieldname, value, doc) {
// set input
if(doc.name===me.docname) {
if (!value && !doc[value]) {
if ((value==='' || value===null) && !doc[value]) {
// both the incoming and outgoing values are falsy
// so don't trigger dirty
// the texteditor, summernote, changes nulls to empty strings on render,
// so ignore those changes
} else {
me.dirty();
}


正在加载...
取消
保存