How can I change the label color for this checkbox if the checkbox is disabled change the text color to red and if it's not change to green.
Here is my code:
<?php
if ($timelists[]='09:00:00'){
?>
<div class="checkbox checkbox-success checkbox-info text-danger">
<input id="checkbox-15" type="checkbox" name="timelist[]"value="09:00:00" <?php echo (in_array("09:00:00", $timelists)?"disabled='disabled'":"") ?>>
<label for="checkbox-15">
09:00 AM - 10:00 AM (ALREADY SCHEDULED)
</label>
</div>
<?php
}
else{
?>
<div class="checkbox checkbox-success checkbox-info text-success">
<input id="checkbox-15" type="checkbox" name="timelist[]"value="09:00:00" <?php echo (in_array("09:00:00", $timelists)?"disabled='disabled'":"") ?>>
<label for="checkbox-15">
09:00 AM - 10:00 AM (AVAILABLE)
</label>
</div>
<?php
}
?>
In This case the checkbox is disabled and label color is red 'text-danger' I got the same ouput when is not disabled and supposed to be the label color is green 'text-success'
Aucun commentaire:
Enregistrer un commentaire