# --
# AdminEmail.dtl - provides global HTML AdminEmail
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminEmail.dtl,v 1.44 2012/11/20 15:08:27 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:RichText -->
$Include{"RichTextEditor"}
<!-- dtl:block:RichText -->
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst">
    <h1>$Text{"Admin Notification"}</h1>

    <div class="SidebarColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Hint"}</h2>
            </div>
            <div class="Content">
                <p class="FieldExplanation">
                    $Text{"With this module, administrators can send messages to agents, group or role members."}
                </p>
            </div>
        </div>
    </div>
    <div class="ContentColumn">

        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Create Administrative Message"}</h2>
            </div>
            <div class="Content">

<!-- dtl:block:Sent -->
                <p>
                    $Text{"Your message was sent to"}: $QData{"Bcc"}
                </p>
<!-- dtl:block:Sent -->

<!-- dtl:block:Form -->
                <form action="$Env{"CGIHandle"}" method="post" name="compose" class="Validate">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="Send"/>

                    <fieldset class="TableLike">
                        <label class="Mandatory" for="From"><span class="Marker">*</span> $Text{"From"}:</label>
                        <div class="Field">
                            <input type="text" name="From" id="From" value="$Config{"AdminEmail"}" class="W75pc Validate_Required $QData{"FromInvalid"}"/>
                            <div id="FromError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                            <div id="FromServerError" class="TooltipErrorMessage">
                                <p>$Text{"This field is required."}</p>
                            </div>
                        </div>
                        <div class="Clear"></div>

                        <label for="UserIDs">$Text{"Send message to users"}:</label>
                        <div class="Field">
                            $Data{"UserOption"}
                        </div>
                        <div class="Clear"></div>

                        <label for="GroupIDs">$Text{"Send message to group members"}:</label>
                        <div class="Field">
                            $Data{"GroupOption"}
                        </div>
                        <div class="Clear"></div>

                        <label for="GroupPermissionRO">$Text{"Group members need to have permission"}:</label>
                        <div class="Field">
                            <input type="radio" name="GroupPermission" id="GroupPermissionRO" value="ro" checked="checked"/>
                            <label for="GroupPermissionRO">$Text{"ro"}</label>
                            <br/>
                            <input type="radio" name="GroupPermission" id="GroupPermissionRW" value="rw"/>
                            <label for="GroupPermissionRW">$Text{"rw"}</label>
                        </div>
                        <div class="Clear"></div>

<!-- dtl:block:RoleRecipients -->
                        <label for="RoleIDs">$Text{"Send message to role members"}:</label>
                        <div class="Field">
                            $Data{"RoleOption"}
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:RoleRecipients -->

<!-- dtl:block:CustomerUserGroups -->
                        <label for="NotifyCustomerUsers">$Text{"Also send to customers in groups"}:</label>
                        <div class="Field">
                            <input type="checkbox" name="NotifyCustomerUsers" id="NotifyCustomerUsers" />
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:CustomerUserGroups -->

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

                        <label class="Mandatory" for="RichText"><span class="Marker">*</span> $Text{"Body"}:</label>
                        <div class="RichTextField">
                            <textarea id="RichText" class="W100pc RichText Validate_RequiredRichText $QData{"RichTextInvalid"}" name="Body" rows="16" cols="78">$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>

                        <div class="Field SpacingTop">
                            <button class="Primary" id="submitRichText" type="submit" value="$Text{"Send"}">$Text{"Send"}</button>
                        </div>
                        <div class="Clear"></div>

                    </fieldset>
                </form>
<!-- dtl:block:Form -->

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