<%doc>
# 
# $Id: create-ticket.html,v 1.4 2002/02/13 17:26:13 fpmip Exp $
#
# create-ticket.html is a gateway page to RT. 

# Authors : Alexandre Dulaunoy <alex@thinkingsecure.com>
#           Tycho Fruru <tycho@fruru.com>
# Copyright (C) 2002 Tycho Fruru <tycho@fruru.com>
# Copyright (C) 2001 Conostix S.A. Luxembourg -- <alex@conostix.com>
# Copyright (C) 2001, 2002 Alexandre Dulaunoy <alex@foo.be>

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
</%doc>
<%args>
$session

$action=>""
$subject=>""
$description=>""
$encoded=>""
</%args>

<%perl>

use MIME::Base64;

if ($encoded eq "base64")
{
$description = decode_base64($description);
} 

#$subject = $session->{'ticketsubject'};
#$description = $session->{'ticketdescription'};

if ($session->{'tickettype'} eq "secadvisory")
{
#my $subject="IPFC : Secadvisory ticket for advisory number $session->{'advid'}";
#my $description=$session->{'advcomment'};

}
elsif ($action eq "update")
{

}
elsif ($action eq "delete")
{
}
elsif ($action eq "none")
{
$session->{'lastaction'}="none";
}
#$session->{query} = "select source_id, source_url, source_creation, source_remark from source order by source_id";
#my @results = $m->comp('../internal/sql-query-adv.ipfc',query=>$session->{query});
my $config = $m->comp('../internal/config.ipfc');
</%perl>
<%perl>
my $return = 
$m->comp('../internal/head-page.html',title=>'CCA Ticket',session=>$session); </%perl>

<body >
<hr noshade>
<table>
<tr>
<td>
<form action="<% $config->{'rt_createticket_url'} %>" 
method="POST" ENCTYPE="multipart/form-data" target="_blank">
<INPUT TYPE=HIDDEN Name="id" VALUE="new">
<INPUT TYPE=HIDDEN NAME=Queue Value="mss">

</td>
</tr>
<tr>
<td>Ticket requestor</td>
<td>
<INPUT Name="Requestors" Value="<% $session->{'email'} %>" SIZE=40>
</td></tr>
<tr><td>Subject : (<i>small and direct information</i>)</td><td>
<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="<% $subject %>">
</td>
</tr>
<tr>
<td>
File to attach (optional) :
</td>
<td>
<INPUT TYPE=FILE NAME="Attach">
<td>
</tr>
<tr>
<td> Initial status of the ticket :</td>
<td>
<SELECT NAME ="Status">
<OPTION VALUE="new" SELECTED>new</OPTION>
<OPTION VALUE="open" >open</OPTION>
<OPTION VALUE="stalled" >stalled</OPTION>
<OPTION VALUE="resolved" >resolved</OPTION>
<OPTION VALUE="dead" >dead</OPTION>
</SELECT>
</td>
</tr>
<tr><td>Complete description of the issue :</td><td>
<TEXTAREA COLS=72 ROWS=15 WRAP=HARD NAME="Content" ><% $description %></TEXTAREA>
</td>
</tr>
<tr>
<td>
<INPUT TYPE=SUBMIT VALUE='Create ticket'>
</td>
</tr>
</form>
</table>	

<%perl>
my $endbody = $m->comp('../internal/end-page.html');
</%perl>

