From: Janusz Dobrowolski Date: Sat, 30 Oct 2010 13:32:54 +0000 (+0000) Subject: Validation code was skipped by esc/ctrlenter hotkeys. X-Git-Tag: v2.4.2~19^2~527 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=d05fc3c1b8c178a322d66ad00ae877df487be3f5;p=fa-stable.git Validation code was skipped by esc/ctrlenter hotkeys. --- diff --git a/js/inserts.js b/js/inserts.js index b9564ed9..a1e1e5ea 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -427,11 +427,13 @@ function setHotKeys() { return false; } if (((asp && asp.indexOf('default') !== -1) && key==13)||((asp && asp.indexOf('cancel') !== -1) && key==27)) { - - if (asp.indexOf('process') !== -1) - JsHttpRequest.request(el, null, 60000); - else - JsHttpRequest.request(el); + var func = _validate[el.name]; + if (func==undefined || func()) { + if (asp.indexOf('process') !== -1) + JsHttpRequest.request(el, null, 60000); + else + JsHttpRequest.request(el); + } ev.returnValue = false; return false; }