# --
# AgentTicketPhoneOutbound.dtl - provides HTML form for phone
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: AgentTicketPhoneOutbound.dtl,v 1.60 2010/11/17 21:32:53 cg 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.
# --

<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose" class="Validate PreventMultipleSubmits">
    <input type="hidden" name="Action"    value="$Env{"Action"}"/>
    <input type="hidden" name="Subaction" value="Store"/>
    <input type="hidden" name="FormID"    value="$QData{"FormID"}"/>
    <input type="hidden" name="TicketID"  value="$QData{"TicketID"}"/>
    <div class="LayoutPopup ARIARoleMain">

        <div class="Header">
            <h1>$Text{"Phone call"}: $QData{"TicketNumber"} - $QData{"Title","60"}</h1>

<!-- dtl:block:TicketBack -->
            <p>
                <a class="CancelClosePopup" href="#">$Text{"Cancel & close window"}</a>
            </p>
<!-- dtl:block:TicketBack -->

        </div>

        <div class="LayoutFixedSidebar SidebarLast">

<!-- dtl:block:CustomerTable -->
            <div id="CustomerInfo" class="SidebarColumn WidgetSimple">
                <div class="Header">
                    <h2>$Text{"Customer Information"}</h2>
                </div>
                <div class="Content">
                    $Data{"CustomerTable"}
                </div>
            </div>
<!-- dtl:block:CustomerTable -->

            <div class="ContentColumn">
                <fieldset class="TableLike FixedLabel">
                    <label class="Mandatory" for="Subject"><span class="Marker">*</span>$Text{"Subject"}:</label>
                    <div class="Field">
                        <input type="text" name="Subject" id="Subject" value="$QData{"Subject"}" class="Validate_Required $QData{"SubjectInvalid"} W75pc"/>
                        <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>

<!-- dtl:block:SpellCheck -->
                    <label>$Text{"Options"}:</label>
                    <div class="Field">
                        <a href="#" id="OptionSpellCheck">[ $Text{"Spell check"} ]</a>
                    </div>
<!-- dtl:block:SpellCheck -->

                    <label class="Mandatory" for="RichText"><span class="Marker">*</span>$Text{"Text"}:</label>
                    <div class="RichTextField">
<!-- dtl:block:RichText -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichText -->

                        <textarea id="RichText" name="Body" title="Message body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}" class="RichText Validate_Required $QData{"BodyInvalid"}">$Data{"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"}">$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 id="FileUpload" name="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 () {
        var $Form = $('#FileUpload').closest('form');
        Core.Form.Validate.DisableValidation($Form);
        $Form.find('#AttachmentUpload').val('1').end().submit();
    });
//]]></script>
<!--dtl:js_on_document_complete-->
                    </div>
                    <div class="Clear"></div>

                    <label for="NextStateID">$Text{"Next ticket state"}:</label>
                    <div class="Field">
                        $Data{"NextStatesStrg"}
                    </div>
                    <div class="Clear"></div>

                    <label>$Text{"Pending Date"} ($Text{"for pending* states"}):</label>
                    <div class="Field">
                        $Data{"PendingDateString"}
                        <div id="DayServerError" class="TooltipErrorMessage"><p>$Text{"Date invalid!"}</p></div>
                        <div id="HourServerError" class="TooltipErrorMessage"><p>$Text{"Date invalid!"}</p></div>
                    </div>
                    <div class="Clear"></div>

<!-- dtl:block:TicketFreeText -->
                    $Data{"TicketFreeKeyField"}
                    <div class="Field">
                        $Data{"TicketFreeTextField"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:TicketFreeText -->

#<!-- dtl:block:TicketFreeText1 -->
#            <tr>
#              <td class="contentkey">$Data{"TicketFreeKeyField1"}:</td>
#              <td class="contentvalue">$Data{"TicketFreeTextField1"}</td>
#            </tr>
#<!-- dtl:block:TicketFreeText1 -->
#<!-- dtl:block:TicketFreeText2 -->
#            <tr>
#              <td class="contentkey">$Data{"TicketFreeKeyField2"}:</td>
#              <td class="contentvalue">$Data{"TicketFreeTextField2"}</td>
#            </tr>
#<!-- dtl:block:TicketFreeText2 -->

<!-- dtl:block:TicketFreeTime -->
                    $Data{"TicketFreeTimeKey"}
                    <div class="Field">
                        $Data{"TicketFreeTime"}
                        <div id="TicketFreeTime$Data{"Count"}UsedError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:TicketFreeTime -->

#<!-- dtl:block:TicketFreeTime1 -->
#            <tr>
#              <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey1"}"}:</td>
#              <td class="contentvalue">$Data{"TicketFreeTime1"}</td>
#            </tr>
#<!-- dtl:block:TicketFreeTime1 -->
#<!-- dtl:block:TicketFreeTime2 -->
#            <tr>
#              <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey2"}"}:</td>
#              <td class="contentvalue">$Data{"TicketFreeTime2"}</td>
#            </tr>
#<!-- dtl:block:TicketFreeTime2 -->

<!-- dtl:block:ArticleFreeText -->
                    $Data{"ArticleFreeKeyField"}
                    <div class="Field">
                        $Data{"ArticleFreeTextField"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:ArticleFreeText -->

#<!-- dtl:block:ArticleFreeText1 -->
#                <tr>
#                  <td class="contentkey">$Data{"ArticleFreeKeyField1"}:</td>
#                  <td class="contentvalue">$Data{"ArticleFreeTextField1"}</td>
#                </tr>
#<!-- dtl:block:ArticleFreeText1 -->
#<!-- dtl:block:ArticleFreeText2 -->
#                <tr>
#                  <td class="contentkey">$Data{"ArticleFreeKeyField2"}:</td>
#                  <td class="contentvalue">$Data{"ArticleFreeTextField2"}</td>
#                </tr>
#<!-- dtl:block:ArticleFreeText2 -->

<!-- dtl:block:TimeUnitsLabel -->
                    <label for="TimeUnits">$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabel -->
<!-- dtl:block:TimeUnitsLabelMandatory -->
                    <label class="Mandatory" for="TimeUnits"><span class="Marker">*</span>$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabelMandatory -->
<!-- dtl:block:TimeUnits -->
                    <div class="Field">
                        <input type="text" name="TimeUnits" id="TimeUnits" value="$QData{"TimeUnits"}" class="W25pc Validate_TimeUnits $QData{"TimeUnitsRequired"} $QData{"TimeUnitsInvalid"}"/>
                        <div id="TimeUnitsError" class="TooltipErrorMessage"><p>$Text{"Invalid time!"}</p></div>
                        <div id="TimeUnitsServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:TimeUnits -->

                </fieldset>
            </div>
        </div>
        <div class="Footer">
            <button class="Primary" id="submitRichText" accesskey="g" title="$Text{"Submit"} (g)" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
        </div>
    </div>
</form>

#Layers
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    Core.Agent.TicketAction.Init();
//]]></script>
<!--dtl:js_on_document_complete-->
