Correction couleur pour Inswitch_place
Correction couleur pour Module sécurité
This commit is contained in:
parent
0088aa8b72
commit
cd78ed2a4a
2 changed files with 10 additions and 4 deletions
|
|
@ -55,19 +55,23 @@ class Inplace_Switch
|
|||
|
||||
function input()
|
||||
{
|
||||
printf('<span style="text-decoration: none" class="inplace_edit icon" id="%s">', $this->name);
|
||||
if ($this->value==1)
|
||||
{
|
||||
echo $this->iconon;
|
||||
$icon=$this->iconon;
|
||||
$color="green";
|
||||
}
|
||||
elseif ($this->value==0)
|
||||
{
|
||||
echo $this->iconoff;
|
||||
$icon=$this->iconoff;
|
||||
$color="red";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(_("Invalide value"));
|
||||
}
|
||||
|
||||
printf('<span style="text-decoration: none;color:%s" class="inplace_edit icon" id="%s">', $color,$this->name);
|
||||
echo $icon;
|
||||
echo '</span>';
|
||||
echo <<<EOF
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -360,9 +360,11 @@ if ( $action == "view" )
|
|||
for (i = 0;i < a_select.length;i++) {
|
||||
str_id = new String( a_select[i].id);
|
||||
if ( str_id.search(/action/) > -1 ) {
|
||||
if ( p_value == 1 ) {
|
||||
if ( p_value == 0 ) {
|
||||
a_select[i].setStyle("color:red");
|
||||
a_select[i].innerHTML='';
|
||||
} else {
|
||||
a_select[i].setStyle("color:green");
|
||||
a_select[i].innerHTML='';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue