) // -------------------- // recognized URL arguments $pattern=$_GET['pattern']; // --- decoration $title="Tag Types"; $tabs=array(); $tabs['All Types']=array('url'=>l_tags(),'bubble'=>"All Tag Types"); // -------------------- drupal_set_title($title); plc_tabs($tabs); // if its edit get the tag info $update_mode = ( $_GET['action'] == 'update-tag-type' ) ; if ($update_mode) { $tag_type_id= intval( $_GET['id'] ); $type_info= $api->GetTagTypes( array( $tag_type_id ) ); $tagname=$type_info[0]['tagname']; $min_role_id= $type_info[0]['min_role_id']; $description= $type_info[0]['description']; $category=$type_info[0]['category']; } // display form for tag types plc_section($label,false); $form = new PlcForm (l_actions(),array()); $form->start(); // XXX make this updatable ? $details = new PlcDetails(false); $details->start(); $details->line("Name", $form->text_html("name",$tagname,20)); $details->line("Category", $form->text_html("category",$category,30)); $details->line("Description",$form->textarea_html("description",$description,40,5)); //tmp // select the option corresponding with min_role_id $selector = "\n"; $details->line("Min Role",$selector); if ($update_mode) { $submit=$form->hidden_html ('tag_type_id',$tag_type_id) . $form->submit_html('update-tag-type',"Update tag type"); } else { $submit=$form->submit_html('add-tag-type',"Add tag type"); } $details->single ($submit,"right"); $details->end(); $form->end(); // Print footer include 'plc_footer.php'; ?>