From: Will Budic Date: Tue, 18 Feb 2020 08:50:10 +0000 (+1100) Subject: Form validation updated. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=1459f83f347aa2f6621906dc029b24be57b646ea;p=LifeLog.git Form validation updated. --- diff --git a/dbLifeLog/main.cnf b/dbLifeLog/main.cnf index 5686d79..94c58de 100644 --- a/dbLifeLog/main.cnf +++ b/dbLifeLog/main.cnf @@ -1,11 +1,12 @@ +!CNF1.0 This is the main configuration file for the LifeLog applications settings. https://github.com/wbudic/LifeLog This is an Open Source License project -> https://choosealicense.com/licenses/isc/ Credential format:< , dont enable here using AUTO_LOGIN option bellow, use config in app. < < -00|$RELEASE_VER = 1.7`LifeLog Application Version. +00|$RELEASE_VER = 1.8`LifeLog Application Version. 01|$REC_LIMIT = 25`Records shown per page. 03|$TIME_ZONE = Australia/Sydney`Time zone of your country. 05|$PRC_WIDTH = 80`Default presentation width for pages. @@ -21,6 +22,7 @@ Credential format:< , dont enable here using AUT 28|$THEME = Standard`Theme to applay, Standard, Sun, Moon, Earth. 30|$DEBUG = 0`Development page additional debug output, off (default) or on. 32|$KEEP_EXCS = 0`Cache excludes between sessions, off (default) or on. +34|$VIEW_ALL_LMT=1000`Limit of all records displayed for large logs. Set to 0, for unlimited. < 01|Unspecified `For quick uncategorised entries. 03|File System `Operating file system/Application short log. @@ -79,3 +81,9 @@ UPDATE LOG SET AFLAG=2 WHERE ID_CAT=%EXPENSE_ID%; LOG<6>|Run Query ' ver. 1.6 ALTER TABLE LOG ADD STICKY BOOL DEFAULT 0; +LOG<6>|Run Query ' ver. 1.8 + +CREATE TABLE notes_temp_table (LID INTEGER PRIMARY KEY NOT NULL, DOC TEXT); +INSERT INTO notes_temp_table SELECT `LID`,`DOC` FROM `NOTES`; +DROP TABLE `NOTES`; +ALTER TABLE `notes_temp_table` RENAME TO `NOTES`; diff --git a/htdocs/cgi-bin/wsrc/main.js b/htdocs/cgi-bin/wsrc/main.js index 4bbb0fd..74a3d8a 100644 --- a/htdocs/cgi-bin/wsrc/main.js +++ b/htdocs/cgi-bin/wsrc/main.js @@ -191,7 +191,13 @@ function formValidation() { alert("Category -> has not been selected!"); return false; } - return validDate($("#frm_entry [name='date']").val()) && validLog($("#frm_entry [name='log']").val()); + var dt = $("#frm_entry [name='date']").val(); + var i = dt.indexOf('id='); + if(i>0){ + dt = dt.substring(0, i-1); + $("#frm_entry [name='date']").val(dt); + } + return validDate(dt) && validLog($("#frm_entry [name='log']").val()); } function formDelValidation() {