# --
# CustomerTicketSearch.dtl - provides HTML form for CustomerTicketSearch.pm
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: CustomerTicketSearch.dtl,v 1.34 2010/11/23 19:24:54 en 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:Search -->
<div id="MainBox" class="Search ARIARoleMain">
    <div class="Content">
        <form action="$Env{"CGIHandle"}" method="post" name="compose">
            <input type="hidden" name="Action" value="$Env{"Action"}"/>
            <input type="hidden" name="Subaction" value="LoadProfile"/>
            <fieldset>
                <h2>$Text{"Profile"}</h2>
                <div>
                    <label for="Profile">$Text{"Search template"}</label>
                    $Data{"ProfilesStrg"}
                </div>
            </fieldset>
            <div class="Row">
                <button name="SelectTemplate" type="submit" value="$Text{"Select"}">$Text{"Select"}</button>
                <button name="EraseTemplate" type="submit" value="$Text{"Delete"}">$Text{"Delete"}</button>
                <button name="SearchTemplate" type="submit" value="$Text{"Search"}">$Text{"Search"}</button>
            </div>
        </form>

        <form action="$Env{"CGIHandle"}" method="post" name="compose">
            <input type="hidden" name="Action" value="$Env{"Action"}"/>
            <input type="hidden" name="Subaction" value="Search"/>
            <fieldset>
                <h2>$Config{"Ticket::Hook"}</h2>
                <div>
                    <label for="TicketNumber">$Config{"Ticket::Hook"}</label>
                    <input title="$Config{"Ticket::Hook"}" type="text" name="TicketNumber"id="TicketNumber" size="30" value="$QData{"TicketNumber"}"/>
                    <p>$Text{"e. g. 10*5155 or 105658*"}</p>
                </div>
                <div>
                    <label for="CustomerID">$Text{"CustomerID"}</label>
                    <input title="$Text{"Customer ID"}" type="text" id="CustomerID" name="CustomerID" value="$QData{"CustomerID"}" size="20" />
                </div>
            </fieldset>
            <fieldset>
                <h2>$Text{"Fulltext search in tickets (e. g. "John*n" or "Will*")"}</h2>
                <div>
                    <label for="From">$Text{"From"}</label>
                    <input title="$Text{"Sender"}" type="text" id="From" name="From" value="$QData{"From"}" size="20" />
                </div>
                <div>
                    <label for="To">$Text{"To"}</label>
                    <input title="$Text{"Recipient"}" type="text" id="To" name="To" value="$QData{"To"}" size="20" />
                </div>
                <div>
                    <label for="Cc">$Text{"Cc"}</label>
                    <input title="$Text{"Carbon Copy"}" type="text" id="Cc" name="Cc" value="$QData{"Cc"}" size="20" />
                </div>
                <div>
                    <label for="Subject">$Text{"Subject"}</label>
                    <input title="$Text{"Subject"}" type="text" id="Subject" name="Subject" value="$QData{"Subject"}" size="20" />
                </div>
                <div>
                    <label for="Body">$Text{"Text"}</label>
                    <input title="$Text{"Text"}" type="text" id="Body" name="Body" value="$QData{"Body"}" size="20" />
                </div>
<!-- dtl:block:FreeText -->
                <div>
                    $Data{"TicketFreeKeyField"}
                    $Data{"TicketFreeTextField"}
                </div>
                <div class="Clear"></div>
<!-- dtl:block:FreeText -->
<!-- dtl:block:FreeTime -->
                <div>
                    <label for ="TicketFreeTime$QData{"Count"}">$Data{"TicketFreeTimeKey"}</label>
                    <input type="checkbox" id="TicketFreeTime$QData{"Count"}" name="TicketFreeTime$QData{"Count"}" value="checked" $QData{"TicketFreeTime"}/>
                    $Text{"Between"} $Data{"TicketFreeTimeStart"} $Text{"and"} $Data{"TicketFreeTimeStop"} $Data{"TicketFreeTime"}
                </div>
                <div class="Clear"></div>
<!-- dtl:block:FreeTime -->
            </fieldset>
            <fieldset class="Columns">
                <div class="Column">
                    <h2><label for="PriorityIDs">$Text{"Priority"}:</label></h2>
                    <div>
                        $Data{"PrioritiesStrg"}
                    </div>
                </div>
                <div class="Column">
                    <h2><label for="StateIDs">$Text{"State"}:</label></h2>
                    <div>
                        $Data{"StatesStrg"}
                    </div>
                </div>
                <div class="Clear"></div>
            </fieldset>
            <fieldset class="TimeSearchType">
                <h2>$Text{"Time restrictions"}</h2>
                <div>
                    <input title="No time settings" type="radio"  id="NoTimeSet" name="TimeSearchType" value="" $Data{"TimeSearchType::None"} />
                    <label for="NoTimeSet">$Text{"All"}</label>
                </div>
                <div>
                    <input title="Specific date" type="radio" id="Date" name="TimeSearchType"  value="TimePoint" $Data{"TimeSearchType::TimePoint"} />
                    <label for="Date">$Text{"Only tickets created"}</label>
                    $Data{"TicketCreateTimePointStart"} $Data{"TicketCreateTimePoint"} $Data{"TicketCreateTimePointFormat"}
                </div>
                <div>
                    <input title="Date range" type="radio" id="DateRange" name="TimeSearchType" value="TimeSlot" $Data{"TimeSearchType::TimeSlot"} />
                    <label for="DateRange">$Text{"Only tickets created between"}</label>
                    $Data{"TicketCreateTimeStart"} $Text{"and"} $Data{"TicketCreateTimeStop"}
                </div>
            </fieldset>
            <fieldset>
                <h2>$Text{"Search-Profile as Template?"}</h2>
                <div>
                    <label for="SaveProfile">$Text{"Save as Template?"}</label>
                    <input title="Save as Template" type="checkbox" id="SaveProfile" name="SaveProfile" />
                </div>
                <div>
                    <label for="Profil">$Text{"Template Name"}</label>
                    <input title="Pick a profil name" type="text" id="Profil" name="Profile" size="30" value="$QData{"Profile"}" />
                </div>
            </fieldset>
            <div id="BottomActionRow" class="ActionRow">
                <button id="Submit" type="submit" value="$Text{"Search"}">$Text{"Search"}</button>
                <span>$Text{"Output to"}</span>
                $Data{"ResultFormStrg"}
            </div>
        </form>
    </div>
</div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">
    Core.Customer.InitFocus();
</script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:Search -->
