~ubuntu-branches/ubuntu/natty/otrs2/natty-updates

« back to all changes in this revision

Viewing changes to Kernel/Output/HTML/Standard/FAQCategoryForm.dtl

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2007-04-14 17:58:55 UTC
  • mto: (20.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: package-import@ubuntu.com-20070414175855-9ne0w01yu1q44ch0
Tags: upstream-2.1.7
ImportĀ upstreamĀ versionĀ 2.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# --
2
 
# FAQCategoryForm.dtl - provides HTML form for faq categories
3
 
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
4
 
# --
5
 
# $Id: FAQCategoryForm.dtl,v 1.7 2005/05/13 21:59:59 martin Exp $
6
 
# --
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.
10
 
# --
11
 
<!-- start form -->
12
 
<script language="JavaScript" type="text/javascript">
13
 
<!--
14
 
function submit_compose()
15
 
{
16
 
    if (document.compose.Name.value == "") {
17
 
        alert('$Text{"Name is required!"}');
18
 
        document.compose.Name.focus();
19
 
        return false;
20
 
    }
21
 
    else {
22
 
        return true;
23
 
    }
24
 
}
25
 
//-->
26
 
</script>
27
 
 
28
 
<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
29
 
<tr>
30
 
  <td align="left" colspan="2" class="mainhead">
31
 
    $Env{"Box0"}$Text{"FAQ Category"}$Env{"Box1"}
32
 
  </td>
33
 
</tr>
34
 
<tr>
35
 
  <td width="40%" class="mainbody">
36
 
 
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">
41
 
  <tr>
42
 
    <td class="contenthead">$Text{"Change"}</td>
43
 
  </tr>
44
 
  <tr>
45
 
    <td width="46%" class="contentbody">$Data{"CategoryOption"}</td>
46
 
  </tr>
47
 
  <tr>
48
 
    <td class="contentfooter"><input class="button" type="submit" value="$Text{"Change"}"></td>
49
 
  </tr>
50
 
  </table>
51
 
  </form>
52
 
  </td>
53
 
 
54
 
 
55
 
  <td width="60%" class="mainbody">
56
 
# --
57
 
# check subaction
58
 
# --
59
 
<dtl set $Data{"Headline"} = "Add">
60
 
<dtl if ($Env{"Subaction"} eq "Change") { $Data{"Headline"} = "Update"; }>
61
 
# set subaction!
62
 
<dtl if ($Env{"Subaction"} eq "") { $Env{"Subaction"} = "Add"; }>
63
 
# check add link
64
 
<dtl if ($Env{"Subaction"} eq "Change") { $Data{"AddLink"} = "(Click here to add)"; }>
65
 
# --
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">
71
 
  <tr>
72
 
    <td class="contenthead">$Text{"$Data{"Headline"}"} <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"$Data{"AddLink"}"}</a></td>
73
 
  </tr>
74
 
    <td class="contentbody">
75
 
    <table border="0" cellspacing="0" cellpadding="3">
76
 
    <tr>
77
 
      <td class="contentvalue">
78
 
        <table border="0" cellspacing="0" cellpadding="3">
79
 
        <tr>
80
 
          <td class="contentkey">$Text{"Category"}: </td>
81
 
          <td class="contentvalue"> <input type="text" name="Name" value="$QData{"Name"}" size="35" maxlength="50"></td>
82
 
        </tr>
83
 
        <tr>
84
 
          <td class="contentkey">$Text{"Comment"}: </td>
85
 
          <td class="contentvalue"> <input type="text" name="Comment" value="$QData{"Comment"}" size="50" maxlength="80"></td>
86
 
        </tr>
87
 
        </table>
88
 
      </td>
89
 
    </tr>
90
 
    </table>
91
 
    </td>
92
 
  </tr>
93
 
  <tr>
94
 
    <td class="contentfooter">
95
 
      <input class="button" type="submit" onclick="return submit_compose();" value="$Text{"$Data{"Headline"}"}">
96
 
    </td>
97
 
  </tr>
98
 
  </table>
99
 
  </form>
100
 
 
101
 
  </td>
102
 
</tr>
103
 
</table>
104
 
<!-- end form -->