2
# FAQCategoryForm.dtl - provides HTML form for faq categories
3
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
5
# $Id: FAQCategoryForm.dtl,v 1.7 2005/05/13 21:59:59 martin Exp $
7
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
8
# the enclosed file COPYING for license information (GPL). If you
9
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
12
<script language="JavaScript" type="text/javascript">
14
function submit_compose()
16
if (document.compose.Name.value == "") {
17
alert('$Text{"Name is required!"}');
18
document.compose.Name.focus();
28
<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
30
<td align="left" colspan="2" class="mainhead">
31
$Env{"Box0"}$Text{"FAQ Category"}$Env{"Box1"}
35
<td width="40%" class="mainbody">
37
<form action="$Env{"CGIHandle"}" method="post">
38
<input type="hidden" name="Action" value="$Env{"Action"}">
39
<input type="hidden" name="Subaction" value="Change">
40
<table border="0" width="100%" align="center" cellspacing="0" cellpadding="4">
42
<td class="contenthead">$Text{"Change"}</td>
45
<td width="46%" class="contentbody">$Data{"CategoryOption"}</td>
48
<td class="contentfooter"><input class="button" type="submit" value="$Text{"Change"}"></td>
55
<td width="60%" class="mainbody">
59
<dtl set $Data{"Headline"} = "Add">
60
<dtl if ($Env{"Subaction"} eq "Change") { $Data{"Headline"} = "Update"; }>
62
<dtl if ($Env{"Subaction"} eq "") { $Env{"Subaction"} = "Add"; }>
64
<dtl if ($Env{"Subaction"} eq "Change") { $Data{"AddLink"} = "(Click here to add)"; }>
66
<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
67
<input type="hidden" name="Action" value="$Env{"Action"}">
68
<input type="hidden" name="Subaction" value="$Env{"Subaction"}Action">
69
<input type="hidden" name="ID" value="$Data{"ID"}">
70
<table border="0" width="100%" align="center" cellspacing="0" cellpadding="4">
72
<td class="contenthead">$Text{"$Data{"Headline"}"} <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"$Data{"AddLink"}"}</a></td>
74
<td class="contentbody">
75
<table border="0" cellspacing="0" cellpadding="3">
77
<td class="contentvalue">
78
<table border="0" cellspacing="0" cellpadding="3">
80
<td class="contentkey">$Text{"Category"}: </td>
81
<td class="contentvalue"> <input type="text" name="Name" value="$QData{"Name"}" size="35" maxlength="50"></td>
84
<td class="contentkey">$Text{"Comment"}: </td>
85
<td class="contentvalue"> <input type="text" name="Comment" value="$QData{"Comment"}" size="50" maxlength="80"></td>
94
<td class="contentfooter">
95
<input class="button" type="submit" onclick="return submit_compose();" value="$Text{"$Data{"Headline"}"}">