# --
# AgentTicketBulk.dtl - provides HTML form for bulk mask
# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id: AgentTicketBulk.dtl,v 1.70.2.1 2013-01-11 10:47:47 mn 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:BulkAction -->
<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose" class="Validate">
    <input type="hidden" name="Action" value="$Env{"Action"}"/>
    <input type="hidden" name="Subaction" value="Do"/>
    <input type="hidden" name="NoteFormID" value="$QData{"NoteFormID"}"/>
    <input type="hidden" name="EmailFormID" value="$QData{"EmailFormID"}"/>

    <div class="LayoutPopup ARIARoleMain">
        <div class="Header">
            <h1>$Text{"Ticket Bulk Action"}</h1>
            <p>
                <a class="CancelClosePopup" href="#">$Text{"Cancel & close window"}</a>
            </p>
        </div>
        <div class="Content">

            <div class="Header">
                <h2>$Text{"Options"}</h2>
            </div>

            <div class="Content">
<!-- dtl:block:UsedTicketID -->
                <input type="hidden" name="TicketID" value="$QData{"TicketID"}" />
<!-- dtl:block:UsedTicketID -->
                <div class="WidgetSimple SpacingTop Collapsed">
                    <div class="Header">
                        <div class="WidgetAction Toggle">
                            <a href="#" title="$Text{"Toggle this widget"}"></a>
                        </div>
                        <h2>$Text{"Add Note"}</h2>
                    </div>
                    <div class="Content">

                        <fieldset class="TableLike FixedLabel">
                            <label class="Mandatory" for="Subject"><span class="Marker">*</span> $Text{"Subject"}:</label>
                            <div class="Field">
                                <input type="text" class="Validate_DependingRequiredAND Validate_Depending_Body $Data{"SubjectInvalid"} W75pc" id="Subject" name="Subject" value="$QData{"Subject"}" />
                                <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>
                            <div class="Clear"></div>
<!-- dtl:block:SpellCheck -->

                            <label class="Mandatory" for="Body"><span class="Marker">*</span> $Text{"Text"}:</label>
                            <div class="RichTextField">
<!-- dtl:block:RichText -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichText -->
                                <textarea id="Body" class="RichText Validate_DependingRequiredAND Validate_Depending_Subject $Data{"BodyInvalid"}" name="Body" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$QData{"Body"}</textarea>
                                <div id="BodyError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                <div id="BodyServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            </div>
                            <div class="Clear"></div>

                            <label for="ArticleTypeID">$Text{"Note type"}:</label>
                            <div class="Field">
                                $Data{"NoteStrg"}
                            </div>
                            <div class="Clear"></div>
<!-- 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" class="Validate_TimeUnits W20pc $QData{"TimeUnitsRequired"} $QData{"TimeUnitsInvalid"}" id="TimeUnits" name="TimeUnits" value="$QData{"TimeUnits"}"/>
                                <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="WidgetSimple SpacingTop Collapsed">
                    <div class="Header">
                        <div class="WidgetAction Toggle">
                            <a href="#" title="$Text{"Toggle this widget"}"></a>
                        </div>
                        <h2>$Text{"Send Email"}</h2>
                    </div>
                    <div class="Content">

                        <fieldset class="TableLike FixedLabel">
                            <label class="Mandatory" for="EmailSubject"><span class="Marker">*</span> $Text{"Subject"}:</label>
                            <div class="Field">
                                <input type="text" class="Validate_DependingRequiredAND Validate_Depending_EmailBody $Data{"SubjectInvalid"} W75pc" id="EmailSubject" name="EmailSubject" value="$QData{"EmailSubject"}" />
                                <div id="EmailSubjectError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                <div id="EmailSubjectServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            </div>
                            <div class="Clear"></div>

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

                            <label class="Mandatory" for="EmailBody"><span class="Marker">*</span> $Text{"Text"}:</label>
                            <div class="RichTextField">
<!-- dtl:block:RichTextEmail -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichTextEmail -->
                                <textarea id="EmailBody" class="RichText Validate_DependingRequiredAND Validate_Depending_EmailSubject $Data{"BodyInvalid"}" name="EmailBody" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$QData{"EmailBody"}</textarea>
                                <div id="EmailBodyError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                <div id="EmailBodyServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            </div>
                            <div class="Clear"></div>
<!-- dtl:block:TimeUnitsLabelEmail -->
                            <label for="EmailTimeUnits">$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabelEmail -->
<!-- dtl:block:TimeUnitsLabelMandatoryEmail -->
                            <label class="Mandatory" for="EmailTimeUnits"><span class="Marker">*</span>$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabelMandatoryEmail -->
<!-- dtl:block:TimeUnitsEmail -->
                            <div class="Field">
                                <input type="text" class="Validate_EmailTimeUnits W20pc $QData{"EmailTimeUnitsRequired"} $QData{"EmailTimeUnitsInvalid"}" id="EmailTimeUnits" name="EmailTimeUnits" value="$QData{"EmailTimeUnits"}"/>
                                <div id="EmailTimeUnitsError" class="TooltipErrorMessage"><p>$Text{"Invalid time!"}</p></div>
                                <div id="EmailTimeUnitsServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            </div>
                            <div class="Clear"></div>
<!-- dtl:block:TimeUnitsEmail -->
                        </fieldset>
                    </div>
                </div>

                <fieldset class="TableLike FixedLabel">
<!-- dtl:block:State -->
                    <label for="StateID">$Text{"Next state"}:</label>
                    <div class="Field">
                        $Data{"NextStatesStrg"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:StatePending -->
                    <label>$Text{"Pending date"}:</label>
                    <div class="Field">
                        $Data{"DateString"}
                        <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:StatePending -->
<!-- dtl:block:State -->

<!-- dtl:block:Type -->
                    <label for="TypeID">$Text{"Type"}:</label>
                    <div class="Field">
                        $Data{"TypeStrg"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:Type -->

<!-- dtl:block:Owner -->
                    <label for="OwnerID">$Text{"Owner"}:</label>
                    <div class="Field">
                        $Data{"OwnerStrg"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:Owner -->

<!-- dtl:block:Responsible -->
                    <label for="ResponsibleID">$Text{"Responsible"}:</label>
                    <div class="Field">
                        $Data{"ResponsibleStrg"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:Responsible -->

                    <label for="QueueID">$Text{"Queue"}:</label>
                    <div class="Field">
                        $Data{"MoveQueuesStrg"}
                    </div>
                    <div class="Clear"></div>

<!-- dtl:block:Priority -->
                    <label for="PriorityID">$Text{"Priority"}:</label>
                    <div class="Field">
                        $Data{"PriorityStrg"}
                    </div>
                    <div class="Clear"></div>
<!-- dtl:block:Priority -->

                    <label>$Text{"Merge"}:</label>
                    <div class="Field">
                        <div>
                            <input type="radio" name="MergeToSelection" id="OptionMergeTo" value="OptionMergeTo" $Data{"MergeToChecked"}/>
                            <label for="MergeTo">$Text{"Merge to"} $Config{"Ticket::Hook"}:</label>
                            <input type="text" class="$QData{"MergeToInvalid"} W50pc" id="MergeTo" name="MergeTo" value="$QData{"MergeTo"}"/>
                            <div id="MergeToServerError" class="TooltipErrorMessage"><p>$Text{"Invalid ticket identifier!"}</p></div>
                        </div>
                        <div>
                            <input type="radio" name="MergeToSelection" id="OptionMergeToOldest" value="OptionMergeToOldest" $Data{"MergeToOldestChecked"}/>
                            <label for="OptionMergeToOldest">$Text{"Merge to oldest"}</label>
                        </div>
                    </div>
                    <div class="Clear"></div>

                    <label for="LinkTogether">$Text{"Link together"}:</label>
                    <div class="Field">
                        $Data{"LinkTogetherYesNoOption"}
                    </div>
                    <div class="Clear"></div>

                    <label for="LinkTogetherParent">$Text{"Link to parent"}:</label>
                    <div class="Field">
                        <input type="text" class="$QData{"LinkTogetherParentInvalid"} W50pc" id="LinkTogetherParent" name="LinkTogetherParent" value="$QData{"LinkTogetherParent"}"/>
                        <div id="LinkTogetherParentServerError" class="TooltipErrorMessage"><p>$Text{"Invalid ticket identifier!"}</p></div>
                    </div>
                    <div class="Clear"></div>

                    <label for="Unlock">$Text{"Unlock tickets"}:</label>
                    <div class="Field">
                        $Data{"UnlockYesNoOption"}
                    </div>
                    <div class="Clear"></div>
                </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>
<!-- dtl:block:ParentReload -->
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
window.opener.Core.UI.Popup.FirePopupEvent('URL', { URL: '$Env{"Baselink"}$Data{"URL"}' });
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:ParentReload -->

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

<!-- dtl:block:BulkAction -->
