From cbf94ab243dc2eed2a81c11d5e971a106c53da38 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 9 Dec 2007 08:11:55 +0000 Subject: [PATCH] mark required input fields visually (darker border and light yellow background) --- etemplate/inc/class.uietemplate.inc.php | 4 ++++ etemplate/templates/default/app.css | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 00c37f86de..edafd42735 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -984,6 +984,10 @@ foreach($sess as $key => $val) { $class = $this->expand_name($class,$show_c,$show_row,$content['.c'],$content['.row'],$content); } + if ($cell['needed'] && !in_array($cell['type'],array('button','buttononly'))) + { + $class .= ' inputRequired'; + } $cell_options = $cell['size']; if (strchr($cell_options,'$') || $cell_options{0} == '@') { diff --git a/etemplate/templates/default/app.css b/etemplate/templates/default/app.css index eb0195c3d7..6b652482f3 100644 --- a/etemplate/templates/default/app.css +++ b/etemplate/templates/default/app.css @@ -18,6 +18,17 @@ .gray { color: gray; } +.leftPad5 { + padding-left: 5px; +} + +/* + * mark input as required + */ +.inputRequired input,.inputRequired select,.inputRequired textarea { + border: gray 1px solid; + background-color: #ffffd0; +} /* * Styles of the eT editor