<?php
#    IRM - The Information Resource Manager
#    Copyright (C) 1999 Yann Ramin
#
#    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.
#
#    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 (in file COPYING) for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
################################################################################


include("../include/irm.inc");
require_once 'include/i18n.php';

AuthCheck("tech");

commonHeader(_("Setup") . " - " . _("FastTrack Templates Add Form"));

if ($add == 1) 
{
  PRINT "<h3>";
  __("FastTrack Template Added Successfuly");
  PRINT "</h3>";
  PRINT "<hr noshade>";
}

__("Use this form to add a FastTrack template.");
PRINT '<a href="'.Config::AbsLoc('users/setup-fasttrack.php').'">';
__("Go back to FastTrack templates");
PRINT '</a><br>';
PRINT '<table width=100% border=1 noshade>
	<form method=post action="'.Config::AbsLoc('users/setup-fasttrack-add.php').'">
	<tr bgcolor=#CCCCCC><th><font face="Arial, Helvetica">';
$new_date = date("Y-m-d H:i:s");
PRINT "<strong>";
__("Add FastTrack Template ");
PRINT "</th></tr>";
PRINT "<tr bgcolor=#DDDDDD><td><strong>";
__("FastTrack Template name: ");
PRINT "</strong><input type=text name=templname value=\"$templname\" size=40></strong>";
PRINT "</font></td></tr>\n";
PRINT "</table>\n";
PRINT "<br>\n";
PRINT '<FORM METHOD=get ACTION="'
	.Config::AbsLoc('users/tracking-fasttrack-add.php').'">';
PRINT "<table border=1 width=100%><tr><th>";
__("Computer");
if(Config::Get('groups'))
{
	echo '/'._("Group");
}
__(" Information");
PRINT "</th></tr>";
PRINT "<tr bgcolor=#DDDDDD><TD>";
PRINT "<INPUT TYPE=\"RADIO\" NAME=\"IDTYPE\" VALUE=\"IRMID\"><STRONG>";
PRINT "IRM ID: ";
PRINT "</STRONG><INPUT TYPE=text NAME=ID SIZE=10>&nbsp;&nbsp;\n";
PRINT "<INPUT TYPE=hidden NAME=is_group VALUE=\"no\">\n";
PRINT "<BR>\n";
if(Config::Get('groups'))
{
	PRINT "<INPUT TYPE=\"RADIO\" NAME=\"IDTYPE\" VALUE=\"GROUP\"> ";
	PRINT "<STRONG>";
	__("Select a group:");
	PRINT "</STRONG>";
	Dropdown_groups("groups", "gID");
	PRINT "<INPUT TYPE=\"HIDDEN\" NAME=\"is_group\" VALUE=\"yes\">\n";
}
PRINT "</TD>\n";
PRINT "</TR>\n";
PRINT "</TABLE>\n";
PRINT "<BR>\n";
PRINT "<table border=1 width=100%><tr><th>";
__("Work Request Information");
PRINT "</th></tr>";
PRINT "<tr bgcolor=#DDDDDD><TD>";
PRINT "<STRONG>";
__("Priority:");
PRINT "</STRONG> <SELECT NAME=priority>\n";
$opts = array(	5 => _('Very High'),
		4 => _('High'),
		3 => _('Normal'),
		2 => _('Low'),
		1 => _('Very Low')
		);
echo select_options($opts, $priority);
PRINT "</SELECT>\n";
PRINT "<BR>\n";
PRINT "<BR>\n";
PRINT "<STRONG>" . _("Describe the problem:") . "</STRONG>\n";
PRINT "<BR>\n";
PRINT "<textarea cols=50 rows=4 wrap=soft name=contents>$request</textarea>"; 
PRINT "<BR><BR>\n";
PRINT "<STRONG>";
__("Describe the solution (will be added as a followup):");
PRINT "</STRONG>\n";
PRINT "<BR>\n";
PRINT "<textarea cols=50 rows=4 wrap=soft name=solution>$response</textarea>\n"; 
PRINT "</TD>\n";
PRINT "</TR>\n";
PRINT "</TABLE>\n";
PRINT "<BR>\n";
PRINT "<table border=1 width=100%><tr><th>";
__("Additional Information");
PRINT "</th></tr>";
PRINT "<tr bgcolor=#DDDDDD><TD>";
PRINT "<STRONG>";
__("Assign to:");
PRINT "</STRONG>\n";
$track = new Tracking($ID);
$assign = $track->getAssign();
if($assign != "")
{
	Tech_list($assign, "user");
} else
{
	Tech_list("","user");
}

PRINT "<BR><BR>\n";
PRINT "<STRONG>" . _("Set Status to:") . "</STRONG>\n";

PRINT "<SELECT NAME=status SIZE=1>";
$opts = array(	'active' => _("Active"),
		'assigned' => _("Assigned"),
		'complete' =>  _("Complete"),
		'new' => _("New"),
		'old' => _("Old"),
		'wait' => _("Wait")
		);
echo select_options($opts, 'new');
PRINT "</SELECT>";

PRINT '<BR><BR><input type="checkbox" name="addtoknowledgebase" value="yes">';
__("If tracking is marked as complete, should it be used to add something to the knowledgebase?");
PRINT "</td></tr>\n";
PRINT "</table>";
PRINT "<table border=0 width=100%><TR><TD><input type=submit value=Submit></TD><tr></table>";
PRINT "</form>";
PRINT "<br>";
commonFooter();
