git://git.onelab.eu
/
plewww.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exclude the 'node' role from the dropdown menu when confusing
[plewww.git]
/
planetlab
/
tags
/
tag.php
diff --git
a/planetlab/tags/tag.php
b/planetlab/tags/tag.php
index
2f915e9
..
dc228fe
100644
(file)
--- a/
planetlab/tags/tag.php
+++ b/
planetlab/tags/tag.php
@@
-111,7
+111,7
@@
$toggle->end();
$form=new PlekitForm(l_actions(), array("tag_type_id"=>$tag_type_id));
$form->start();
$form=new PlekitForm(l_actions(), array("tag_type_id"=>$tag_type_id));
$form->start();
-$toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles'
,false
)));
+$toggle=new PlekitToggle ('roles',count_english($roles,"role"),array('visible'=>get_arg('show_roles')));
$toggle->start();
if (! $roles) plc_warning ("This tag type has no role !");
$toggle->start();
if (! $roles) plc_warning ("This tag type has no role !");
@@
-153,11
+153,11
@@
if ($can_manage_roles) {
// add
// compute the roles that can be added
if ($can_manage_roles)
// add
// compute the roles that can be added
if ($can_manage_roles)
- // all roles
+ // all roles
- don't exclude 'node' as it's actually meaningful for some tags
$exclude_role_ids=array();
else
$exclude_role_ids=array();
else
- // all roles except admin and pi
- $exclude_role_ids=array(10,20);
+ // all roles except admin and pi
, and node to avoid confusing people
+ $exclude_role_ids=array(10,20
,50
);
$possible_roles = roles_except($api->GetRoles(),$exclude_role_ids);
$roles_to_add = roles_except ($possible_roles,$role_ids);
if ( $roles_to_add ) {
$possible_roles = roles_except($api->GetRoles(),$exclude_role_ids);
$roles_to_add = roles_except ($possible_roles,$role_ids);
if ( $roles_to_add ) {