# --
# AgentBook.dtl - provides HTML form for AgentBook
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AgentBook.dtl,v 1.29 2012/11/20 15:15:45 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.
# --

$Include{"AgentCustomerSearch"}
<!-- start addressbook form -->
<div class="LayoutPopup">
    <div class="Content">
        <h1>$Text{"Address Book"}</h1>
        <form id="AddressBook" action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data">
            <fieldset class="SpacingTop">
                <input type="text" name="Search" id="Search" value="" class="W75pc" title="$Text{"Search for a customer"}"/>
                <button type="submit" value="$Text{"Search"}" >$Text{"Search"}</button>
            </fieldset>
<!-- dtl:block:SearchResult -->
            <table id="SearchResult" class="DataTable SpacingTop">
                <thead>
                    <tr>
                        <th>$Text{"Name"}</th>
                        <th>$Text{"To"}</th>
                        <th>$Text{"Cc"}</th>
                        <th>$Text{"Bcc"}</th>
                    </tr>
                </thead>
                <tbody>
<!-- dtl:block:Row -->
                    <tr id="Row$QData{"Count"}">
                        <td>$QData{"Name"}</td>
                        <td><a href="" rel="ToCustomer" title="$Text{"Add email address %s to the To field", "$QData{"Email"}"}">$Text{"To"}</a></td>
                        <td><a href="" rel="CcCustomer" title="$Text{"Add email address %s to the Cc field", "$QData{"Email"}"}">$Text{"Cc"}</a></td>
                        <td><a href="" rel="BccCustomer" title="$Text{"Add email address %s to the Bcc field", "$QData{"Email"}"}">$Text{"Bcc"}</a></td>
                    </tr>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    Core.Data.Set($('#Row$QData{"Count"}'), 'Email', "$QData{"Email"}");
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:Row -->
                </tbody>
            </table>
<!-- dtl:block:SearchResult -->
            <input type="hidden" name="Action" value="AgentBook" />
            <fieldset class="TableLike FixedLabel SpacingTop">
                <label for="To">$Text{"To"}:</label>
                <div class="Field">
                    <input type="text" name="ToCustomer" id="ToCustomer" value="$QData{"ToCustomer"}" class="W75pc CustomerAutoComplete" />
                </div>
                <div class="Clear"></div>
                <label for="Cc">$Text{"Cc"}:</label>
                <div class="Field">
                    <input type="text" name="CcCustomer" id="CcCustomer" value="$QData{"CcCustomer"}" class="W75pc CustomerAutoComplete" />
                </div>
                <div class="Clear"></div>
                <label for="Bcc">$Text{"Bcc"}:</label>
                <div class="Field">
                    <input type="text" name="BccCustomer" id="BccCustomer" value="$QData{"BccCustomer"}" class="W75pc CustomerAutoComplete" />
                </div>
            </fieldset>
        </form>
        <div class="Center SpacingTop">
            <button type="button" id="Apply" value="$Text{"Apply"}">$Text{"Apply"}</button>
            <button type="button" id="Cancel" value="$Text{"Cancel"}">$Text{"Cancel"}</button>
        </div>
    </div>
</div>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    Core.Agent.TicketAction.InitAddressBook();
//]]></script>
<!--dtl:js_on_document_complete-->
