X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plekit%2Fphp%2Fdetails.php;h=e9cbc395a86d9d5c7bc4e95a82003440780c3a8c;hb=23d8b9c0df8872a70fc9dda57eaea640d9d2b133;hp=ccf1c4abf678f90b9ee4bb8a3f0cd14f8e5c9fd8;hpb=878ce4154f4619a5d07c780bf1f76dfd46771df4;p=plewww.git diff --git a/plekit/php/details.php b/plekit/php/details.php index ccf1c4a..e9cbc39 100644 --- a/plekit/php/details.php +++ b/plekit/php/details.php @@ -1,7 +1,5 @@ // xxx todo : accept optional arguments as an options hash, rather than using the set_ methods which are ugly -class PlcDetails { +class PlekitDetails { var $editable; var $form; @@ -34,7 +32,7 @@ class PlcDetails { var $height; var $input_type; - function PlcDetails ($editable) { + function PlekitDetails ($editable) { $this->editable=$editable; $this->form=NULL; $this->width=""; @@ -47,9 +45,9 @@ class PlcDetails { // start the details area, with an optional caption function start ($caption="") { print $this->start_html("$caption");} function start_html ($caption="") { - $html=""; - if ($caption) $html .= ""; - $html .= ""; + $html="
$caption
"; + if ($caption) $html .= ""; + $html .= ""; return $html; } @@ -59,10 +57,10 @@ class PlcDetails { } // starts an inner form if the details are editable - // accpets same args as PlcForm - function form_start ($url,$values,$method="POST") { print $this->form_start_html($url,$values,$method); return $this->form; } - function form_start_html ($url,$values,$method="POST") { - $this->form = new PlcForm ($url,$values,$method); + // accpets same args as PlekitForm + function form_start ($url,$values,$options=NULL) { print $this->form_start_html($url,$values,$options); return $this->form; } + function form_start_html ($url,$values,$options=NULL) { + $this->form = new PlekitForm ($url,$values,$options); return $this->form->start_html(); } @@ -124,7 +122,7 @@ class PlcDetails { else $height=$this->height; $html=""; - $html .= ""; + $html .= ""; $html .= "\n"; } + function space_html () { return "\n"; } }
$caption
"; // xxx hack: if input_type is select : user provides the input field verbatim if ( $input_type == "select" ) { @@ -137,9 +135,9 @@ class PlcDetails { } else { // set id too $html .= "tr_html($title,$align);} function tr_html($title,$align=NULL) { - $result="
space_html(); } - function space_html () { return "