# --
# Article.dtl - provides Article fields HTML for the AgentTicketProcess.pm
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: Article.dtl,v 1.6 2012/11/20 15:29:48 mh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
<!-- dtl:block:rw:Article -->

<div class="FieldSeparator"></div>

<!-- dtl:block:rw:Article:InformAgent -->
<label for="InformUserID">$Text{"Inform Agent"}:</label>
<div class="Field">
    $Data{"OptionStrg"}
</div>
<div class="Clear"></div>
<!-- dtl:block:rw:Article:InformAgent -->

<label class="$QData{"MandatoryClass"}" for="Subject">
<!-- dtl:block:LabelSpanSubject -->
    <span class="Marker">*</span>
<!-- dtl:block:LabelSpanSubject -->
    $QData{"LabelSubject"}:
</label>
<div class="Field">
    <input type="text" id="Subject" name="Subject" value="$QData{"Subject"}" class="W75pc $QData{"ValidateRequired"} $QData{"SubjectServerError"}"/>
    <div id="SubjectError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
    <div id="SubjectServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
</div>
<div class="Clear"></div>

<label class="$QData{"MandatoryClass"}" for="RichText">
<!-- dtl:block:LabelSpanBody -->
    <span class="Marker">*</span>
<!-- dtl:block:LabelSpanBody -->
    $QData{"LabelBody"}:
</label>
<!-- dtl:block:BodySeparator -->
<div class="Clear" ></div>
<!-- dtl:block:BodySeparator -->
<div class="RichTextField">
<!-- dtl:block:RichText -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichText -->
    <textarea id="RichText" class="RichText $QData{"ValidateRequired"} $QData{"BodyServerError"}" name="Body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$QData{"Body"}</textarea>
    <div id="RichTextError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
    <div id="RichTextServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
</div>
<div class="Clear"></div>
<label>$Text{"Attachment"}:</label>
<div class="Field">
    <ul>
<!-- dtl:block:Attachment -->
        <li>
            $QData{"Filename"} ($QData{"Filesize"})
            <button type="submit" id="AttachmentDelete$QData{"FileID"}" name="AttachmentDelete$QData{"FileID"}" value="$Text{"Delete"}" class="SpacingLeft">$Text{"Delete"}</button>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    $('#AttachmentDelete$QData{"FileID"}').bind('click', function () {
        Core.Form.Validate.DisableValidation($('#AttachmentDelete$QData{"FileID"}').closest('form'));
    });
//]]></script>
<!--dtl:js_on_document_complete-->
        </li>
<!-- dtl:block:Attachment -->
        <li>
            <input name="FileUpload" id="FileUpload" type="file" size="40"/>
            <input type="hidden" id="AttachmentUpload" name="AttachmentUpload" value="0" />
        </li>
    </ul>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    $('#FileUpload').bind('change', function (Event) {
        var $Form = $('#FileUpload').closest('form');
        Core.Form.Validate.DisableValidation($Form);
        $Form.find('#AttachmentUpload').val('1').end().submit();
    });
//]]></script>
<!--dtl:js_on_document_complete-->
</div>
<!-- dtl:block:rw:Article:DescriptionShort -->
<div class="Field FieldExplanation">$Data{"DescriptionShort"}</div>
<!-- dtl:block:rw:Article:DescriptionShort -->
<div class="Clear"></div>
<div class="FieldSeparator"></div>
<!-- dtl:block:rw:Article -->
