diff --git a/include/lib/inum.class.php b/include/lib/inum.class.php index 7b3063317..41d919587 100644 --- a/include/lib/inum.class.php +++ b/include/lib/inum.class.php @@ -63,7 +63,7 @@ class INum extends IText $r='javascript." $readonly $this->extra >"; + 'SIZE="'.$this->size.' " '.$this->javascript." $readonly $this->extra >"; /* add tag for column if inside a table */ if ($this->table==1) diff --git a/include/lib/itext.class.php b/include/lib/itext.class.php index 783ae93f2..b0fb54394 100644 --- a/include/lib/itext.class.php +++ b/include/lib/itext.class.php @@ -20,11 +20,20 @@ // Copyright Author Dany De Bontridder danydb@aevalys.eu /*! * \file - * \brief Html Input + * \brief Html Input Text */ /*! * \class IText - * \brief Html Input + * \brief Html Input Text + * member : + * - placeholder (string) placeholder + * - title (string) title of the HTML ELT + * - autofocus (bool) true to have an autofocus + * - css_size (string) size in the specified unit ex: 20% + * - pattern (string) pattern for HTML + * - maxlength (int) max length of the fied + * - size (int) size without unit + * - require (bool) is element require */ class IText extends HtmlInput { @@ -34,6 +43,7 @@ class IText extends HtmlInput var $css_size; var $pattern; /*!< $pattern HTML pattern */ var $maxlength; /*!< HTML maxlength */ + var $require ; /*!< $require (bool)*/ function __construct($name='',$value='',$p_id="") { parent::__construct($name,$value,$p_id); @@ -82,7 +92,7 @@ class IText extends HtmlInput { $r= sprintf(' + size="%s" %s %s %s %s %s %s %s> ',$this->style, $this->id, $this->name, @@ -100,7 +110,7 @@ class IText extends HtmlInput ); } else { $r= sprintf(' + style="width:%s ;" %s %s %s %s %s> ',$this->style, $this->id, $this->name, @@ -140,7 +150,7 @@ class IText extends HtmlInput $r='style.' TYPE="TEXT" id="'. $this->id.'"'.$t. 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. - 'SIZE="'.$this->size.'" '.$this->javascript." $readonly $this->extra $strAttribute>"; + 'SIZE="'.$this->size.'" '.$this->javascript." $readonly $this->extra $strAttribute>"; } else { $r='style.' TYPE="TEXT" id="'. $this->id.'"'.$t.