From: Janusz Dobrowolski Date: Fri, 8 May 2009 10:19:49 +0000 (+0000) Subject: Small changes needed for client-side validation support. X-Git-Tag: v2.4.2~19^2~1405 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=ce2a1cae35df4f60c3b993d79cb9eb65cb2cb82e Small changes needed for client-side validation support. --- diff --git a/includes/current_user.inc b/includes/current_user.inc index 97afe9d0..53e7855c 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -315,7 +315,7 @@ function set_user_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl } function add_user_js_data() { - global $path_to_root, $thoseps, $decseps; + global $path_to_root, $thoseps, $decseps, $date_system, $dateseps; $ts = $thoseps[user_tho_sep()]; $ds = $decseps[user_dec_sep()]; @@ -324,7 +324,10 @@ function add_user_js_data() { . "var user = {\n" . "theme: '". $path_to_root . '/themes/'. user_theme().'/'."',\n" . "loadtxt: '"._('Requesting data...')."',\n" - . "date: '".Today()."',\n" + . "date: '".Today()."',\n" // server date + . "datesys: ".$date_system.",\n" + . "datefmt: ".user_date_format().",\n" + . "datesep: '".$dateseps[user_date_sep()]."',\n" . "ts: '$ts',\n" . "ds: '$ds',\n" . "pdec : " . user_price_dec() . "}\n"; diff --git a/includes/errors.inc b/includes/errors.inc index 1a39f163..1c0f2f97 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -38,7 +38,7 @@ function fmt_errors($center=false) { $type = E_USER_NOTICE; $content = ''; - $class = 'no_msg'; +// $class = 'no_msg'; if (count($messages)) { foreach($messages as $cnt=>$msg) { if ($msg[0]>$type) continue; @@ -59,11 +59,10 @@ function fmt_errors($center=false) { $content .= ($cnt ? '
' : '').$str; } $class = $msg_class[$type]; + $content = "
$content
"; } else - if ($path_to_root=='.') - return ''; - - $content = "
$content
"; + if ($path_to_root=='.') + return ''; return $content; } //----------------------------------------------------------------------------- diff --git a/includes/main.inc b/includes/main.inc index 4687f707..e45f5973 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -20,6 +20,7 @@ include_once($path_to_root . "/includes/prefs/sysprefs.inc"); include_once($path_to_root . "/includes/db/comments_db.inc"); include_once($path_to_root . "/includes/db/sql_functions.inc"); include_once($path_to_root . "/includes/db/audit_trail_db.inc"); +include_once($path_to_root . "/includes/validation.inc"); include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); @@ -36,7 +37,7 @@ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $scri include($path_to_root . "/includes/page/header.inc"); page_header($title, $no_menu, $is_index, $onload, $js); - error_box(); +// error_box(); if($script_only) { echo '