From 9376603f41ebe81e5ecc3951fbc64030720c418b Mon Sep 17 00:00:00 2001 From: Will Budicm Date: Fri, 11 Dec 2020 00:01:45 +1100 Subject: [PATCH] DBI_LOG_VAR_SIZE --- htdocs/cgi-bin/wsrc/main.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/cgi-bin/wsrc/main.js b/htdocs/cgi-bin/wsrc/main.js index dba436a..d0782b3 100644 --- a/htdocs/cgi-bin/wsrc/main.js +++ b/htdocs/cgi-bin/wsrc/main.js @@ -16,17 +16,19 @@ var DEF_BACKGROUND = 'white'; var RTF_DOC_RESIZED = false; var RTF_DOC_ORIG; var TIME_STAMP; -var TIMEZONE; +var TIMEZONE; +var DBI_LVAR_SZ; function onBodyLoadGeneric() { $("input[type=submit], input[type=reset], .ui-widget-content, button, .a_").button(); $("#btn_save_doc").button(); } -function onBodyLoad(toggle, tz, today, expires, rs_cur) { +function onBodyLoad(toggle, tz, today, expires, rs_cur, log_limit) { - TIMEZONE = tz; - TIME_STAMP = new Date(today); + TIMEZONE = tz; + TIME_STAMP = new Date(today); + DBI_LVAR_SZ = parseInt(log_limit); onBodyLoadGeneric(); if (toggle) { @@ -361,6 +363,9 @@ function validate(dt, log) { if (!log) { msg = msg + "Log field entry can't be empty, can't submit!
"; } + else if (log.length>DBI_LVAR_SZ) { + msg = msg+ "Log Server has an text limit of (" + DBI_LVAR_SZ +" ) Your log size is:" + log.length; + } if(msg){ return dialogModal( "Sorry Form Validation Failed", msg); } -- 2.34.1