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

<!-- dtl:block:Overview -->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"System Email Addresses Management"}</h1>

    <div class="SidebarColumn">
<!-- dtl:block:ActionList -->

        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
<!-- dtl:block:ActionOverview -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"}" class="CallForAction"><span>$Text{"Go to overview"}</span></a>
                    </li>
<!-- dtl:block:ActionOverview -->
<!-- dtl:block:ActionAdd -->
                    <li>
                        <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Add" class="CallForAction Plus"><span>$Text{"Add system address"}</span></a>
                    </li>
<!-- dtl:block:ActionAdd -->
                </ul>
            </div>
        </div>
<!-- dtl:block:ActionList -->

        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"All incoming email with this address in To or Cc will be dispatched to the selected queue."}
                </p>
            </div>
        </div>
    </div>

    <div class="ContentColumn">
        <div class="WidgetSimple">

<!-- dtl:block:OverviewResult -->
            <div class="Header">
                <h2>$Text{"List"}</h2>
            </div>
            <div class="Content">
                <table class="DataTable">
                    <thead>
                        <tr>
                            <th>$Text{"Email address"}</th>
                            <th>$Text{"Display name"}</th>
                            <th>$Text{"Comment"}</th>
                            <th>$Text{"Validity"}</th>
                            <th>$Text{"Changed"}</th>
                            <th>$Text{"Created"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="6">
                                $Text{"No data found."}
                            </td>
                        </tr>
<!-- dtl:block:NoDataFoundMsg -->
<!-- dtl:block:OverviewResultRow -->
                        <tr>
                            <td><a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Change;ID=$LQData{"ID"}">$QData{"Name"}</a></td>
                            <td title="$QData{"Realname"}">$QData{"Realname","26"}</td>
                            <td title="$QData{"Comment"}">$QData{"Comment","26"}</td>
                            <td>$Text{"$Data{"Valid"}"}</td>
                            <td>$TimeShort{"$QData{"ChangeTime"}"}</td>
                            <td>$TimeShort{"$QData{"CreateTime"}"}</td>
                        </tr>
<!-- dtl:block:OverviewResultRow -->
                    </tbody>
                </table>
            </div>
<!-- dtl:block:OverviewResult -->

<!-- dtl:block:OverviewUpdate -->
            <div class="Header">
<!-- dtl:block:HeaderAdd -->
                <h2>$Text{"Add System Email Address"}</h2>
<!-- dtl:block:HeaderAdd -->
<!-- dtl:block:HeaderEdit -->
                <h2>$Text{"Edit System Email Address"}</h2>
<!-- dtl:block:HeaderEdit -->
            </div>
            <div class="Content">
                <form action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="$LQData{"Action"}Action"/>
                    <input type="hidden" name="ID" value="$QData{"ID"}"/>
                    <fieldset class="TableLike">
                        <label class="Mandatory" for="Name"><span class="Marker">*</span> $Text{"Email address"}:</label>
                        <div class="Field">
                            <input type="$QEnv{"EmailFieldType"}" name="Name" id="Name" value="$QData{"Name"}" class="W50pc Validate_Email Validate_Required $QData{"NameInvalid"}" maxlength="200"/>
                            <div id="NameError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required and needs to be a valid email address."}</p>
                            </div>
                            <div id="NameServerError" class="TooltipErrorMessage">
<!-- dtl:block:RequiredFieldServerErrorMsg -->
                                <p>$Text{"This field is required."}</p>
<!-- dtl:block:RequiredFieldServerErrorMsg -->
<!-- dtl:block:EmailInvalidConfigServerErrorMsg -->
                                <p>$Text{"This email address is not allowed due to the system configuration."}</p>
<!-- dtl:block:EmailInvalidConfigServerErrorMsg -->
<!-- dtl:block:EmailInvalidMXServerErrorMsg -->
                                <p>$Text{"This email address failed MX check."}</p>
<!-- dtl:block:EmailInvalidMXServerErrorMsg -->
<!-- dtl:block:EmailInvalidDNSServerErrorMsg -->
                                <p>$Text{"DNS problem, please check your configuration and the error log."}</p>
<!-- dtl:block:EmailInvalidDNSServerErrorMsg -->
<!-- dtl:block:EmailInvalidSyntaxServerErrorMsg -->
                                <p>$Text{"The syntax of this email address is incorrect."}</p>
<!-- dtl:block:EmailInvalidSyntaxServerErrorMsg -->
                            </div>
                        </div>

                        <div class="Clear"></div>

                        <label class="Mandatory" for="Realname"><span class="Marker">*</span> $Text{"Display name"}:</label>
                        <div class="Field">
                            <input type="text" name="Realname" id="Realname" value="$QData{"Realname"}" class="W50pc Validate_Required $QData{"RealnameInvalid"}" maxlength="200"/>
                            <div id="RealnameError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="RealnameServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <p class="FieldExplanation">
                                $Text{"The display name and email address will be shown on mail you send."}
                            </p>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="QueueID"><span class="Marker">*</span> $Text{"Queue"}:</label>
                        <div class="Field">
                            $Data{"QueueOption"}
                            <div id="QueueIDError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="QueueIDServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="ValidID"><span class="Marker">*</span> $Text{"Validity"}:</label>
                        <div class="Field">
                            $Data{"ValidOption"}
                            <div id="ValidIDError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="ValidIDServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label for="Comment">$Text{"Comment"}:</label>
                        <div class="Field">
                            <input type="text" name="Comment" id="Comment" value="$QData{"Comment"}" class="W50pc" maxlength="250"/>
                        </div>
                        <div class="Clear"></div>

                        <div class="Field SpacingTop">
                            <button class="Primary" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
                            $Text{"or"}
                            <a href="$Env{"Baselink"}Action=$Env{"Action"}">$Text{"Cancel"}</a>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>
                </form>
            </div>
<!-- dtl:block:OverviewUpdate -->
        </div>
    </div>
    <div class="Clear"></div>
</div>
<!-- dtl:block:Overview -->
