49 $this->
style=
'class="inum"';
50 $this->
javascript=
'onchange="format_number(this,2);"';
59 $this->
id=($this->
id==
"")?$this->
name:$this->
id;
61 $style=
' class="inum input_text_ro"';
62 $this->
value=str_replace(
'"',
'', $this->
value??
"0");
63 $r=
'<INPUT '.$style.
' TYPE="TEXT" id="'.
65 'NAME="'.$this->name.
'" VALUE="'.$this->
value.
'" '.
66 'SIZE="'.$this->size.
'" '.$this->
javascript.
" $readonly $this->extra >";
77 public function input($p_name=
null, $p_value=
null)
79 if (isset($this->
prec))
81 $this->
javascript=
'onchange="format_number(this,'.$this->prec.
');"';
83 $this->
name=($p_name==
null)?$this->
name:$p_name;
84 $this->
value=($p_value===
null)?$this->
value:$p_value;
85 $this->
id=($this->
id==
"")?$this->
name:$this->
id;
90 $t=((isset($this->
title)))?
'title="'.$this->title.
'" ':
' ';
98 $r=
'<INPUT '.$this->style.
' TYPE="TEXT" id="'.
100 'NAME="'.$this->name.
'" VALUE="'.$this->
value.
'" '.
101 'SIZE="'.$this->size.
'" '.$this->
javascript.
" $this->extra $strAttribute >";
106 $r=
'<INPUT '.$this->style.
' TYPE="TEXT" id="'.
108 'NAME="'.$this->name.
'" VALUE="'.$this->
value.
'" '.
109 ' style="width:'.$this->css_size.
';" '.$this->
javascript.
" $this->extra $strAttribute >";
113 $r=
'<td>'.$r.
'</td>';
124 if ( $this->
id==
"") {
127 $id_read=sprintf(
"x1_span_%s",$this->
id);
128 $id_input=sprintf(
"x2_span_%s",$this->
id);
130 $p_javascript_read=sprintf(
"$('%s').hide();$('%s').show();",
133 $p_javascript_input=sprintf(
"$('%s').hide();$('%s').show();",
136 $p_javascript_update=sprintf(
"$('update_%s').innerHTML=$('%s').value;$('%s').hide();$('%s').show();$p_js_update",
141 $r=sprintf(
'<span id="%s">',$id_read);
142 $r.=sprintf(
'<span id="update_%s">',$this->
id).$this->value.
'</span>';
146 $r.=sprintf(
'<span id="%s" style="display:none">',$id_input);
noalyss_str_replace($search, $replace, $string)
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
This class handles only the numeric input, the input will call a javascript to change comma to period...
input($p_name=null, $p_value=null)
show the html input of the widget
display()
print in html the readonly value of the widget
__construct($name='', $value='', $id="")
change($p_js_update="")
like inplace_edit but without the ajax call, the INPUT text will be changed but not submitted @parame...
static modify($p_id, $p_javascript)
Display the icon to modify a idem.
static validate($p_id, $p_javascript)
Display the icon to modify a idem.
static cancel($p_id, $p_javascript)
Display the icon to modify a idem.