From d3491e9ac08ba4ddf1192fb47b848e4d0c430dfc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Nov 2012 11:55:39 +0100 Subject: [PATCH] Fix: Colors must be set into CSS. --- htdocs/core/class/html.form.class.php | 10 ++-------- htdocs/theme/auguria/style.css.php | 3 +++ htdocs/theme/bureau2crea/style.css.php | 3 +++ htdocs/theme/eldy/style.css.php | 3 +++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1b0033f5d3f..dc25d81344d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1236,14 +1236,8 @@ class Form $opt.= ($objp->rowid == $selected)?' selected="selected"':''; if (! empty($conf->stock->enabled) && $objp->fk_product_type == 0 && isset($objp->stock)) { - if ($objp->stock > 0) - { - $opt.= ' style="background-color:#32CD32; color:#F5F5F5;"'; - } - else if ($objp->stock <= 0) - { - $opt.= ' style="background-color:#FF0000; color:#F5F5F5;"'; - } + if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"'; + else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"'; } $opt.= '>'; $opt.= $objp->ref.' - '.dol_trunc($label,32).' - '; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 8f232b4219a..b981dc6d69b 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1497,6 +1497,9 @@ a.impayee:hover { font-weight: bold; color: #550000; } * Other */ +.product_line_stock_ok { color: #002200; } +.product_line_stock_too_low { color: #664400; } + .fieldrequired { font-weight: bold; color: #000055; } .photo { diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 28216be4411..e1c8f5a6abf 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -1657,6 +1657,9 @@ a.impayee:hover { font-weight: bold; color: #550000; } * Other */ +.product_line_stock_ok { color: #002200; } +.product_line_stock_too_low { color: #664400; } + .fieldrequired { font-weight: bold; color: #000055; } .photo { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index c12c0ab1854..5f0e563a1cf 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1825,6 +1825,9 @@ a.impayee:hover { font-weight: bold; color: #550000; } * Other */ +.product_line_stock_ok { color: #002200; } +.product_line_stock_too_low { color: #664400; } + .fieldrequired { font-weight: bold; color: #000055; } .photo {