user_syndicate page, use tag and add action to set it
[raven.git] / apps / gacksadmin / user_syndicate.php
index 6b013d4..3e3b786 100644 (file)
@@ -46,32 +46,18 @@ $account_name = get_account_name($api, $_person_id);
 if ($account_name != NULL) {
     $gacksapi = new GACKSAPI();
 
-    $image = get_slice_image($api, $account_name);
-    if (!$image) {
-        $image = "";
-    }
-
-    $image_selectors = array();
-    $image_selectors []= array("display"=>"Default PlanetLab image", "value"=>"");
-    $image_selectors []= array("display"=>"Hadoop", "value"=>"hadoop");
-    $image_selectors []= array("display"=>"MPI", "value"=>"mpi");
-    if (!in_array($image, array("", "hadoop", "mpi"))) {
-        $image_selectors []= array("display"=> $image, "value"=> $image);
-    }
-    select_selector($image, $image_selectors);
-
-    $form = new PlekitForm(l_gacks_actions(), array("action"=>"set-image",
+    $form = new PlekitForm(l_gacks_actions(), array("action"=>"set-syndicate",
                                                     "account_name"=> $account_name));
     $form->start();
 
-    if (False) {
+    if (get_slice_tag($api, $account_name, "enable_syndicate")) {
         $syndicate_options=array('checked'=>'checked');
     } else {
         $syndicate_options=array();
     }
 
     print "<br>";
-    print $form->checkbox_html('syndicate-control', 'yes', $syndicate_options);
+    print $form->checkbox_html('enable_syndicate', '1', $syndicate_options);
     print "Enable Syndicate Shared Filesystem<br><br>";
 
     print $form->submit_html("submit", "submit");