# --
# AgentTicketMerge.dtl - provides HTML form for ticket merge mask
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AgentTicketMerge.dtl,v 1.53 2012-02-14 08:28:08 mg 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="AgentTicketMerge"/>
    <input type="hidden" name="Subaction" value="Merge"/>
    <input type="hidden" name="TicketID"  value="$QData{"TicketID"}"/>

    <div class="LayoutPopup ARIARoleMain">
        <div class="Header">
            <h1>$Text{"Ticket Merge"}: $QData{"TicketNumber"} - $QData{"Title","60"}</h1>

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

<!-- dtl:block:PropertiesLock -->
            <p>
                $Text{"The ticket has been locked"}.
                <a class="UndoClosePopup" href="$Env{"Baselink"}Action=AgentTicketLock;Subaction=Unlock;TicketID=$LQData{"TicketID"};$QEnv{"ChallengeTokenParam"}">
                    $Text{"Undo & close window"}
                </a>
            </p>
<!-- dtl:block:PropertiesLock -->

        </div>
        <div class="Content">

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

            <div class="Content">
                <fieldset class="TableLike FixedLabel">

                    <label class="Mandatory" for="MainTicketNumber"><span class="Marker">*</span>$Text{"Merge to"} $Config{"Ticket::Hook"}:</label>
                    <div class="Field">
                        <input type="text" id="MainTicketNumber" name="MainTicketNumber" value="$QData{"MainTicketNumber"}" class="Validate_Required $Data{"MainTicketNumberInvalid"} W33pc" />
                        <div id="MainTicketNumberError" class="TooltipErrorMessage"><p>$Text{"You need to use a ticket number!"}</p></div>
                        <div id="MainTicketNumberServerError" class="TooltipErrorMessage"><p>$Text{"A valid ticket number is required."}</p></div>
                    </div>
                    <div class="Clear"></div>

                    <label for="InformSender">$Text{"Inform sender"}:</label>
                    <div class="Field">
                        <input type="checkbox" id="InformSender" name="InformSender" value="1"/>
                    </div>
                    <div class="Clear"></div>

                    <label for="From">$Text{"From"}:</label>
                    <div class="Field">
                        $QData{"From"}
                        <input type="hidden" id="From" name="From" value="$QData{"From"}"/>
                    </div>
                    <div class="Clear"></div>

                    <label class="Mandatory" for="To"><span class="Marker">*</span>$Text{"To"}:</label>
                    <div class="Field">
                        <input type="text" id="To" name="To" value="$QData{"To"}" class="Validate_Required $Data{"ToInvalid"} W75pc"/>
                        <div id="ToError" class="TooltipErrorMessage" ><p>$Text{"Need a valid email address."}</p></div>
                        <div id="ToServerError" class="TooltipErrorMessage"><p>$Text{"Need a valid email address or don't use a local email address."}</p></div>
                    </div>
                    <div class="Clear"></div>

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

                    <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" class="RichText Validate_Required $Data{"RichTextInvalid"}" 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>

                </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>
