itext = new IText($name,$value,$p_id); $this->itext->title = _("Numéro TVA"); $this->itext->placeholder = "CO9999999999"; $this->itext->extra = ""; $this->itext->style = ' class="input_text" '; $this->autofocus = false; } function input() { if ( $this->readOnly==true) return $this->display(); $return = $this->itext->input(); $return .= $this->button_check_vat(); $return.=sprintf('
',$this->itext->id); return $return; } public function getIText(): IText { return $this->itext; } public function setIText(IText $itext): IVATNumber { $this->itext = $itext; return $this; } function button_check_vat() { $button=new \IButton(uniqid()); $button->javascript=sprintf("category_card.check_vatnumber('%s')", $this->itext->id); $button->extra='style="padding-bottom:0px"'; $button->label=_("Vérifie"); return $button->input(); } function display() { return $this->itext->display(); } static function testme() { $ivatnumber=new IVATNumber("av_text13"); echo $ivatnumber->input(); } }