Sfoglia il codice sorgente

[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 anni fa
committed by Faris Ansari
parent
commit
ce066019ff
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. +3
    -2
      frappe/public/js/legacy/form.js

+ 3
- 2
frappe/public/js/legacy/form.js Vedi File

@@ -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();
}


Caricamento…
Annulla
Salva