Fix ID problem

This commit is contained in:
Dany De Bontridder 2017-12-05 12:05:18 +01:00
parent 349aa8f856
commit 101df3adf1

View file

@ -26,12 +26,12 @@ require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
class ICheckBox extends HtmlInput
{
/*!\brief show the html input of the widget*/
public function input($p_name=null,$p_value=null)
public function input($p_name=null,$p_value=null,$id="")
{
$this->name=($p_name==null)?$this->name:$p_name;
$this->value=($p_value==null)?$this->value:$p_value;
if ( $this->readOnly==true) return $this->display();
$this->id=($this->id=="")?$this->name:$this->id;
$this->id=($this->id=="")?$this->name:$this->id;
$check=( $this->selected==true )?"checked":"unchecked";
$r='<input type="CHECKBOX" id="'.$this->id.'" name="'.$this->name.'"'.' value="'.$this->value.'"';