if ($local_peer && $privileges)
if ($enabled)
$tabs['Disable'] = array ('method'=>'POST',
- 'url'=>l_person_actions(),
+ 'url'=>l_actions(),
'values'=> array ('person_id'=>$person_id,
'action'=>'disable-person'),
'bubble'=>"Disable $first_name $last_name",
'confirm'=>"Are you sure you want to disable $first_name $last_name");
else
$tabs['Enable'] = array ('method'=>'POST',
- 'url'=>l_person_actions(),
+ 'url'=>l_actions(),
'values'=> array ('person_id'=>$person_id,
'action'=>'enable-person'),
'bubble'=>"Enable $first_name $last_name",
// become
if (plc_is_admin() && ! $is_my_account)
- $tabs['Become'] = array('url'=>l_person_actions(),
+ $tabs['Become'] = array('method'=>'POST',
+ 'url'=>l_actions(),
'values'=>array('action'=>'become-person',
'person_id'=>$person_id),
'bubble'=>"Become $first_name $last_name",
// delete
if ($local_peer && $privileges)
$tabs['Delete'] = array ('method'=>'POST',
- 'url'=>l_person_actions(),
+ 'url'=>l_actions(),
'values'=> array ('person_id'=>$person_id,
'action'=>'delete-person'),
'bubble'=>"Delete $first_name $last_name",
plc_details_end();
//////////////////// slices
-echo "<hr />\n";
-plc_table_title('Slices');
+plc_section('Slices');
if( ! $slices) {
plc_warning ("User has no slice");
$headers=array('Slice name'=>'string');
$table_options=array('notes_area'=>false,
'pagesize'=>5);
- plc_table_start("person_slices",$headers,1,$table_options);
+ plc_table_start("person-slices",$headers,1,$table_options);
foreach( $slices as $slice ) {
$slice_name= $slice['name'];
plc_table_cell(l_slice_t($slice_id,$slice_name));
plc_table_row_end();
}
- plc_table_end("person_slices");
+ plc_table_end("person-slices");
}
// we don't set 'action', but use the submit button name instead
-plc_form_start(l_person_actions(),
+plc_form_start(l_actions(),
array("person_id"=>$person_id,
// uncomment this to run the 'debug' action
//"action"=>"debug",
));
//////////////////// keys
-echo "<hr />\n";
-plc_table_title ("Keys");
+plc_section ("Keys");
$can_manage_keys = ( $local_peer && ( plc_is_admin() || $is_my_account) );
if ( empty( $key_ids ) ) {
if ($can_manage_keys) $headers['Remove']="none";
// table overall options
$table_options=array("search_area"=>false,"notes_area"=>false);
-plc_table_start("person_keys",$headers,"1",$table_options);
+plc_table_start("person-keys",$headers,"1",$table_options);
if ($keys) foreach ($keys as $key) {
$key_id=$key['key_id'];
"<td> $upload_key_right_area </td>";
}
-plc_table_end("person_keys",array("footers"=>$footers));
+plc_table_end("person-keys",array("footers"=>$footers));
//////////////////// sites
-echo "<hr />\n";
-plc_table_title('Sites');
+plc_section('Sites');
// sites
if (empty( $sites ) ) {
if ($can_manage_sites)
$headers['Remove']="string";
$table_options = array('notes_area'=>false,'search_area'=>false);
-plc_table_start ("person_sites",$headers,0,$table_options);
+plc_table_start ("person-sites",$headers,0,$table_options);
foreach( $sites as $site ) {
$site_name= $site['name'];
$site_id= $site['site_id'];
$footers []="<td style='text-align:right'> $add_site_left_area </td>".
"<td colspan=2> $add_site_right_area </td>";
}
-plc_table_end("person_sites",array("footers"=>$footers));
+plc_table_end("person-sites",array("footers"=>$footers));
//////////////////// roles
-echo "<hr />\n";
-plc_table_title("Roles");
+plc_section("Roles");
if (! $roles) plc_warning ("This user has no role !");
$can_manage_roles= ($local_peer && plc_is_admin());
$headers=array("Role"=>"none");
if ($can_manage_roles) $headers ["Remove"]="none";
-plc_table_start("person_roles",$headers,0,$table_options);
+plc_table_start("person-roles",$headers,0,$table_options);
// construct array of role objs
$role_objs=array();
$footers []="<td style='text-align:right'> $add_role_left_area </td>".
"<td colspan=2> $add_role_right_area </td>";
}
-plc_table_end("person_roles",array("footers"=>$footers));
+plc_table_end("person-roles",array("footers"=>$footers));
//////////////////////////////
plc_form_end();