# --
# FAQArticleForm.dtl - provides HTML form for faq articles
# Copyright (C) 2001-2004 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: FAQArticleForm.dtl,v 1.6.2.1 2004/03/29 13:12:18 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
<!-- start form -->
<script language="JavaScript" type="text/javascript">
<!--
function submit_compose()
{
    if (document.compose.Subject.value == "") {
        alert('$Text{"A article should have a title!"}');
        document.compose.Subject.focus();
        return false;
    }
    else {
        return true;
    }
}
//-->
</script>
# --
# check subaction
# --
# set subaction!
<dtl if ($Env{"Subaction"} eq "") { $Env{"Subaction"} = "Add"; }>
# check add link
<!-- start form -->
<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
<tr> 
  <td align="left" colspan="2" class="table0">
  <b>$Env{"Box0"}$Text{"FAQ Article"}$Env{"Box1"}</b>
  </td>
</tr>
<tr align="left" valign="top">
  <td width="100%" class="table1">
    <form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
    <input type="hidden" name="Action" value="$Env{"Action"}">
    <input type="hidden" name="Subaction" value="$Env{"Subaction"}Action">
    <input type="hidden" name="ID" value="$Data{"ID"}">
    <table border="0" cellspacing="0" cellpadding="3">
    <tr>
      <td class="table1">$Text{"Category"}: </td>
      <td class="table1"> $Data{"CategoryOption"}</td>
    </tr>
    <tr>
      <td class="table1">$Text{"State"}: </td>
      <td class="table1"> $Data{"StateOption"}</td>
    </tr>
    <tr>
      <td class="table1">$Text{"Filename"}: </td>
      <td class="table1"> <input type="text" name="Name" value="$QData{"Name"}" size="50" maxlength="50"></td>
    </tr>
    <tr>
      <td class="table1">$Text{"Language"}: </td>
      <td class="table1"> $Data{"LanguageOption"} </td>
    </tr>
    <tr>
      <td class="table1">$Text{"Title"}: </td>
      <td class="table1"> <input type="text" name="Subject" value="$QData{"Subject"}" size="65" maxlength="120"></td>
    </tr>
    <tr>
      <td class="table1">$Text{"Keywords"}: </td>
      <td class="table1"> <input type="text" name="Keywords" value="$QData{"Keywords"}" size="65" maxlength="120"></td>
    </tr>
    <tr>
      <td colspan="2"><hr></td>
    </tr>
    <tr>
      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field1"}"}: </td>
      <td class="table1">
<textarea name="Field1" rows="12" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field1"}</textarea>
    </tr>
    <tr>
      <td colspan="2"><hr></td>
    </tr>
    <tr>
      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field2"}"}: </td>
      <td class="table1">
<textarea name="Field2" rows="12" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field2"}</textarea>
      </td> 
    </tr>
    <tr>
      <td colspan="2"><hr></td>
    </tr>
    <tr>
      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field3"}"}: </td>
      <td class="table1">
<textarea name="Field3" rows="12" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field3"}</textarea>
      </td>
    </tr>
    <tr>
      <td colspan="2"><hr></td>
    </tr>
#    <tr>
#      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field4"}"}: </td>
#      <td class="table1">
#<textarea name="Field4" rows="12" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field4"}</textarea>
#      </td>
#    </tr>
#    <tr>
#      <td colspan="2"><hr></td>
#    </tr>
#    <tr>
#      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field5"}"}: </td>
#      <td class="table1">
#<textarea name="Field5" rows="12" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field5"}</textarea>
#      </td>
#    </tr>
#    <tr>
#      <td colspan="2"><hr></td>
#    </tr>
    <tr>
      <td class="table1" valign="top">$Text{"$Config{"FAQ::Field6"}"}: </td>
      <td class="table1">
<textarea name="Field6" rows="4" cols="65" wrap="$Env{"BrowserWrap"}">$Data{"Field6"}</textarea>
      </td>
    </tr>
    <tr>
      <td colspan="2"><hr></td>
    </tr>
    </table>
    <input class="button" type="submit" value="$Text{"submit"}" onclick="return submit_compose();"> 
    </form>
  </td>
</tr>
</table>
<!-- end form -->
