slice creation page - sites sorted and correctly show current site - layout reviewed
[plewww.git] / plekit / php / linetabs.php
index 43d24e5..ce5e808 100644 (file)
@@ -46,6 +46,8 @@ drupal_set_html_head('
 // (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned 
 
 function plekit_linetabs ($tabs, $id=NULL) {
+  // do not output anything if $tabs has no entry (unpleasant rendering)
+  if (empty ($tabs)) return;
   $active_line_tab=$_GET['active_line_tab'];
   // need id to pass to the onclick function attached to the input buttons
   $id="linetabs";
@@ -76,7 +78,8 @@ function plekit_linetabs ($tabs, $id=NULL) {
     if ( ! $values) $values = array();
     if ($url_values) $values = array_merge($values,$url_values);
     if ( $values ) foreach ($values as $key=>$value) {
-       print "<input type='hidden' name='$key' value='$value' />";
+      if ($key != "active_line_tab")
+        print "<input type='hidden' name='$key' value='$value' />";
     }
     print "<input type='hidden' name='active_line_tab' value='$label' />";
     if ($label == $active_line_tab) $tracer = "class='linetabs-submit active'";