& /Admin/Elements/Header, Title => $title &> <& /Admin/Elements/GroupTabs, GroupObj => $Group &> <& /Elements/ListActions, actions => \@results &> <& /Elements/TitleBoxStart, title => $title &>
<%INIT> my ($title); my (@results); my $Group = RT::Group->new($session{'CurrentUser'}); if ($Create) { $title = loc("Create a new group"); } else { if ($id eq 'new' ) { my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => "$Name"); unless ($create_id) { Abort (loc("Group could not be created: [_1]", $create_msg)); } $id = $Group->Id; } else { $Group->Load($id) || Abort('Could not load group'); } if ($id) { $title = loc("Modify the group [_1]", $Group->Name); } # If the create failed else { $title = loc("Create a new group"); $Create = 1; } } if ($id) { my @fields = qw(Description Name ); my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, Object => $Group, ARGSRef => \%ARGS ); push (@results,@fieldresults); } %INIT> <%ARGS> $Create => undef $Name => undef $Description => undef $id => undef %ARGS>