1# --
2# Copyright (C) 2001-2020 OTRS AG, https://otrs.com/
3# --
4# This software comes with ABSOLUTELY NO WARRANTY. For details, see
5# the enclosed file COPYING for license information (GPL). If you
6# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
7# --
8
9[% IF Data.ShowSearchDialog %]
10<div class="MainBox ARIARoleMain CustomerUserAdressBookSearch">
11    <h1>[% Translate("Customer User Address Book") | html %]</h1>
12    <div class="FieldExplanation">[% Translate("Search for recipients and add the results as '%s'.", Data.RecipientFieldLabel) | html %]</div>
13    <div class="ContentColumn">
14        <form action="[% Env("CGIHandle") %]" method="post" id="SearchForm" class="CustomerUserAddressBookForm">
15            <input type="hidden" name="Action" value="[% Env("Action") %]" id="SearchAction"/>
16            <input type="hidden" name="Subaction" value="Search"/>
17            <input type="hidden" name="EmptySearch" value="[% Data.EmptySearch | html %]" id="EmptySearch"/>
18            <input type="hidden" name="ShownAttributes" value="" id="ShownAttributes">
19            <input type="hidden" name="RecipientType" value="[% Data.RecipientType | html %]" id="RecipientType" />
20            <input type="hidden" name="RecipientField" value="[% Data.RecipientField | html %]" id="RecipientField" />
21            <input type="hidden" name="RecipientFieldLabel" value="[% Data.RecipientFieldLabel | html %]" id="RecipientFieldLabel" />
22            <input type="hidden" name="ExcludeUserLoginsJSON" value="" id="ExcludeUserLogins">
23            <fieldset class="TableLike SpacingTop">
24                <legend><span>[% Translate("Templates") | html %]</span></legend>
25                <label>[% Translate("Search template") | html %]:</label>
26                <div class="Field">
27                    [% Data.ProfilesStrg %]
28                    <div id="SearchProfileAddBlock" class="SpacingTopSmall">
29                        <input type="text" name="Name" id="SearchProfileAddName"/>
30                        <button type="button" title="[% Translate("Create Template") | html %]" id="SearchProfileAddAction" class="CallForAction Inline"><span>[% Translate("Add") | html %]</span></button>
31                    </div>
32                </div>
33                <div class="Field">
34                    <button id="SearchProfileNew" value="[% Translate("Create New") | html %]" class="CallForAction Inline"><span>[% Translate("Create New") | html %]</span></button>
35                    <button id="SearchProfileDelete" class="CallForAction Inline Hidden" value="[% Translate("Delete") | html %]"><span>[% Translate("Delete") | html %]</span></button>
36                </div>
37                <div class="Clear"></div>
38                <label>[% Translate("Save changes in template") | html %]:</label>
39                <div class="Field">
40                    <input type="checkbox" name="SaveProfile" id="SaveProfile" value="1"/>
41                </div>
42            </fieldset>
43            <fieldset class="TableLike SpacingTop" id="SearchInsert">
44                <legend><span>[% Translate("Filters in use") | html %]</span></legend>
45            </fieldset>
46            <fieldset class="TableLike SpacingTop">
47                <legend><span>[% Translate("Additional filters") | html %]</span></legend>
48                <label>[% Translate("Add another attribute") | html %]:</label>
49                <div class="Field">
50                    [% Data.AttributesStrg %]
51                    <div class="FieldExplanation">[% Translate("The attributes with the identifier '(Customer)' are from the customer company.") | html %]</div>
52                </div>
53                <div class="Clear"></div>
54            </fieldset>
55        </form>
56
57        <fieldset class="TableLike Hidden" id="SearchAttributesHidden">
58
59        [% FOR SearchField IN Data.OutputSearchFields %]
60            <div class="Clear"></div>
61            <label for="[% SearchField.Name | html %]" id="Label[% SearchField.Name | html %]">[% Translate(SearchField.Label) | html %]:</label>
62            <div class="Field">
63            [% IF SearchField.SelectionString %]
64                [% SearchField.SelectionString %]
65            [% ELSE %]
66                <input type="text" name="[% SearchField.Name | html %]" placeholder="[% Translate("(e. g. Term* or *Term*)") | html %]" value="[% SearchField.Value | html %]" class="W50pc"/>
67            [% END %]
68                <a class="RemoveButton" href="#" title="[% Translate("Remove this entry") | html %]"><i class="fa fa-minus-square-o"></i><span class="InvisibleText">[% Translate("Remove") | html %]</span></a>
69            </div>
70        [% END %]
71
72    [% RenderBlockStart("DynamicField") %]
73            <div class="Clear"></div>
74            [% Data.Label %]
75            <div class="Field">
76                [% Data.Field %]
77                <a class="RemoveButton" href="#" title="[% Translate("Remove this entry") | html %]"><i class="fa fa-minus-square-o"></i><span class="InvisibleText">[% Translate("Remove") | html %]</span></a>
78            </div>
79    [% RenderBlockEnd("DynamicField") %]
80
81            <div class="Clear"></div>
82            [% Data.AttributesOrigStrg %]
83        </fieldset>
84    </div>
85
86    <div class="SearchFormButton Hidden">
87        <button id="SearchFormSubmit" class="Primary CallForAction" value="Run search"><span><i class="fa fa-search"></i> [% Translate("Run search") | html %]</span></button>
88        <button id="FormCancel" class="CallForAction"><span>[% Translate("Cancel") | html %]</span></button>
89    </div>
90</div>
91[% END %]
92