js you have the javascript code * - SELECT the options are passed via this->value, this array is * build thanks the make_array function, each array (of the * array) aka row must contains a field value and a field label * - PASSWORD * - CHECKBOX * - RADIO * - TEXTAREA * - RICHTEXT * - FILE * - JS_SEARCH_POSTE call a popup window for searching the account * - JS_SEARCH call a popup window for searching a quickcode or to add one * - JS_SEARCH_ONLY like JS_SEARCH but without adding a quickcode * - SPAN * - JS_TVA open a popup window for the VAT * - JS_CONCERNED open a popup window for search a operation, if extra == 0 then * get the amount thx javascript * - js_DATE show a calendar * * For JS_SEARCH_POST,JS_SEARCH or JS_SEARCH_ONLY * - $extra contains 'cred', 'deb', 'all' or a list of fiche_def_ref (frd_id) * to filter the search/add for the card * * - $extra2 filter on the card parameter, which are given in Avance->journaux menu, * it is the journal id. If empty, there is no link with a ledger * */ class widget { var $type; /*!< $type type of the widget */ var $name; /*!< $name field NAME of the INPUT */ var $value; /*!< $value what the INPUT contains */ var $readonly; /*!< $readonly true : we cannot change value */ var $size; /*!< $size size of the input */ var $selected; /*!< $selected for SELECT RADIO and CHECKBOX the selected value */ var $table; /*!< $table =1 add the table tag */ var $label; /*!< $label the question before the input */ var $disabled; /*!< $disabled poss. value == true or nothing, to disable INPUT*/ var $extra; /*!< $extra different usage, it depends of the $type */ var $extra2; /*!< $extra2 different usage, it depends of the $type */ var $javascript; var $tabindex; function widget($p_type="",$p_label="",$p_name="",$p_value="") { $this->type=$p_type; $this->name=$p_name; $this->readonly=false; $this->size=20; $this->width=50; $this->heigh=20; $this->value=$p_value; $this->selected=""; $this->table=0; $this->label=$p_label; $this->disabled=false; $this->javascript=""; $this->extra2="all"; } function SetReadOnly($p_read) { $this->readonly=$p_read; } /*! function IOValue($p_name,$p_value="",$p_label="") ***************************************************** * \brief create the corresponding INPUT tag * * \param $p_name is the INPUT NAME * \param $p_value is the INPUT VALUE or an array for select * \param $p_label is the label of the INPUT * \return string containing the tag */ function IOValue($p_name=null,$p_value=null,$p_label="") { if ( $p_name != null) $this->name=$p_name; $this->value=($p_value===null)?$this->value:$p_value; $this->label=($p_label == "")?$this->label:$p_label; // Input text type $disabled = $this->disabled ? "DISABLED" : ""; if (strtoupper($this->type)=="TEXT") { if ( $this->readonly==false) { $r="name\" ". " NAME=\"$this->name\" VALUE=\"$this->value\" SIZE=\"$this->size\" ".$this->javascript." ".$disabled.">"; } else { $r=sprintf('%s', $this->value,$this->name,$this->name,$this->value); } if ($this->table==1) { if ( $this->label != "") { $r="
'; $r.=$this->value; $r.=sprintf('', $this->name,urlencode($this->value)); $r.='
'; } if ($this->table==1) { $r="
';
$r.='
';
}
if ($this->table==1) {
if ( $this->label != "") {
$r="