X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fincludes%2Fplc_details.php;h=de77ebc0fdcf9005f2bc09bf4511334f4b04cffe;hb=19ea00f9f677acff2b94f9c066c2949cc63d435c;hp=06dd3ed6ded872b6c75b0661b0a28bc22c164304;hpb=350bb4d9c096b0cfb877fb67ab94ebac753a98a5;p=plewww.git diff --git a/planetlab/includes/plc_details.php b/planetlab/includes/plc_details.php index 06dd3ed..de77ebc 100644 --- a/planetlab/includes/plc_details.php +++ b/planetlab/includes/plc_details.php @@ -30,6 +30,8 @@ class PlcDetails { $this->field_height="2"; } + function form() { return $this->form; } + // start the details area, with an optional caption function start ($caption="") { print $this->start_html("$caption");} function start_html ($caption="") { @@ -78,14 +80,21 @@ class PlcDetails { } else { $html=""; $html .= ""; - $html .= "input_type == "textarea") { - if ($this->field_width) $html .= " cols=$this->field_width/"; - if ($this->field_height) $html .= " rows=$this->field_height/"; + $html .= ""; + // hack: if input_type is select : user provides the input field verbatim + if ( $this->input_type == "select" ) { + $html .= $value; + } else if ($this->input_type == "textarea") { + $html .= ""; } else { - if ($this->field_width) $html .= " size=$this->field_width/"; + $html .= "field_width) $html .= " size=$this->field_width"; + $html .= "/>"; } - $html .= ">"; + $html .= ""; return $html; } }