diff options
author | ivan <ivan> | 2002-08-12 06:17:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-08-12 06:17:09 +0000 |
commit | 3ef62a0570055da710328937e7f65dbb2c027c62 (patch) | |
tree | d549158b172fd499b4f81a2981b62aabbde4f99b /rt/webrt/Admin/Groups/Modify.html | |
parent | 030438c9cb1c12ccb79130979ef0922097b4311a (diff) |
import rt 2.0.14
Diffstat (limited to 'rt/webrt/Admin/Groups/Modify.html')
-rw-r--r-- | rt/webrt/Admin/Groups/Modify.html | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/rt/webrt/Admin/Groups/Modify.html b/rt/webrt/Admin/Groups/Modify.html new file mode 100644 index 000000000..7104a6937 --- /dev/null +++ b/rt/webrt/Admin/Groups/Modify.html @@ -0,0 +1,83 @@ +<& /Admin/Elements/Header, Title => $title &> + +<& /Admin/Elements/GroupTabs, GroupObj => $Group &> +<& /Elements/ListActions, actions => \@results &> + + +<& /Elements/TitleBoxStart, title => $title &> + +<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST> + +%unless ($Group->Id) { +<INPUT TYPE=HIDDEN NAME=id VALUE="new"> +% } else { +<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>"> +% } +<TABLE> +<TR><TD ALIGN=RIGHT> +Name: +</TD> +<TD><INPUT name="Name" value="<%$Group->Name%>"></TD> +</TR><TR> +<TD ALIGN=RIGHT> +Description:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD></TR> +</TABLE> +<& /Elements/TitleBoxEnd &> + +<& /Elements/Submit &> +</form> +<%INIT> + +my ($title); +my (@results); + +my $Group = new RT::Group($session{'CurrentUser'}); + +if ($Create) { + $title = "Create a new group"; +} + +else { + + if ($id eq 'new' ) { + + $Group->Create(Name => "$Name") || Abort ("Group could not be created."); + $id = $Group->Id; + } + else { + $Group->Load($id) || Abort('Could not load group'); + } + + + if ($id) { + $title = "Modify the group ". $Group->Name; + + } + + # If the create failed + else { + $title = "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> |