Переглянути джерело

disable save in a form

version-14
Anand Doshi 12 роки тому
джерело
коміт
00e15bf945
1 змінених файлів з 7 додано та 1 видалено
  1. +7
    -1
      public/js/legacy/widgets/form/form.js

+ 7
- 1
public/js/legacy/widgets/form/form.js Переглянути файл

@@ -931,7 +931,7 @@ _f.Frm.prototype.savesubmit = function(btn) {
if(!r.exc && me.cscript.on_submit) { if(!r.exc && me.cscript.on_submit) {
me.runclientscript('on_submit', me.doctype, me.docname); me.runclientscript('on_submit', me.doctype, me.docname);
} }
}, btn);
}, btn);
}); });
} }


@@ -966,6 +966,12 @@ _f.Frm.prototype.amend_doc = function() {
this.copy_doc(fn, 1); this.copy_doc(fn, 1);
} }


_f.Frm.prototype.disable_save = function() {
cur_frm.save_disabled = true;
cur_frm.page_layout.footer.hide_save();
cur_frm.frm_head.appframe.buttons.Save.toggle(false);
}

_f.get_value = function(dt, dn, fn) { _f.get_value = function(dt, dn, fn) {
if(locals[dt] && locals[dt][dn]) if(locals[dt] && locals[dt][dn])
return locals[dt][dn][fn]; return locals[dt][dn][fn];


Завантаження…
Відмінити
Зберегти