focus on first input only if docstatus = 0

This commit is contained in:
Anand Doshi 2012-03-22 11:38:31 +05:30
parent 34f580c96b
commit 915b1d7a28
2 changed files with 5 additions and 2 deletions

View file

@ -583,7 +583,10 @@ _f.Frm.prototype.refresh = function(docname) {
}
// focus on first input
$(this.wrapper).find('.form-layout-row :input:first').focus();
if(this.doc.docstatus==0) {
$(this.wrapper).find('.form-layout-row :input:first').focus();
}
} else {
// show print layout

View file

@ -41,7 +41,7 @@ def get_bootinfo():
# remove email settings from control panel dict
for field in ['mail_login', 'mail_password', 'mail_port', 'outgoing_mail_server', 'use_ssl']:
del cp[field]
if field in cp: del cp[field]
# system info
bootinfo['control_panel'] = cp.copy()