# --
# AdminUser.dtl - provides HTML form for AdminUser
# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
# --
# $Id: AdminUser.dtl,v 1.40 2011/12/23 13:47:18 mg 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 class="Header">$Text{"Agent 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:ActionSearch -->
                    <li>
                        <form class="SearchBox" action="$Env{"CGIHandle"}" method="post">
                            <input type="hidden" name="Action" value="$Env{"Action"}"/>
                            <input type="hidden" name="Subaction" value="Search"/>
                            <input type="text" name="Search" value="$QData{"Search"}" id="Search" title="$Text{"Search"}"/>
                            <button type="submit" value="$Text{"Search"}">$Text{"Search"}</button>
                        </form>
                        <p class="FieldExplanation">
                            $Text{"Wildcards like '*' are allowed."}
                        </p>
                    </li>
<!-- dtl:block:ActionSearch -->
<!-- dtl:block:ActionAdd -->
                    <li>
                        <a class="CallForAction Plus" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Add">
                            <span>$Text{"Add agent"}</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{"Agents will be needed to handle tickets."}
                </p>
                <p>
                    $Text{"Attention"}: $Text{"Don't forget to add a new agent to groups and/or roles!"}
                </p>
            </div>
        </div>

    </div>

    <div class="ContentColumn">
        <div class="WidgetSimple">
<!-- dtl:block:OverviewHeader -->
            <div class="Header">
                <h2>$Text{"List"}</h2>
            </div>
<!-- dtl:block:OverviewHeader -->
<!-- dtl:block:NoSearchTerms -->
            <div class="Content">
                <p>$Text{"Please enter a search term to look for agents."}</p>
            </div>
<!-- dtl:block:NoSearchTerms -->

<!-- dtl:block:OverviewResult -->
            <div class="Content">
                <table class="DataTable" id="User">
                    <thead>
                        <tr>
                            <th>$Text{"Username"}</th>
                            <th>$Text{"Name"}</th>
                            <th>$Text{"Email"}</th>
                            <th>$Text{"Last login"}</th>
<!-- dtl:block:OverviewResultSwitchToUser -->
                            <th>$Text{"Login as"}</th>
<!-- dtl:block:OverviewResultSwitchToUser -->
                            <th>$Text{"Validity"}</th>
                            <th>$Text{"Changed"}</th>
                            <th>$Text{"Created"}</th>
                        </tr>
                    </thead>
                    <tbody>
<!-- dtl:block:NoDataFoundMsg -->
                        <tr>
                            <td colspan="$QData{"ColSpan"}">
                                $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;UserID=$LQData{"UserID"};Search=$LQData{"Search"}">$QData{"UserLogin"}</a>
                            </td>
                            <td>$QData{"UserFirstname"} $QData{"UserLastname"}</td>
                            <td title="$QData{"UserEmail"}">$QData{"UserEmail","26"}</td>
                            <td>$TimeShort{"$QData{"UserLastLoginTimestamp"}"}</td>
<!-- dtl:block:OverviewResultRowSwitchToUser -->
                            <td>
                                <a class="AsBlock" href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=Switch;UserID=$LQData{"UserID"};$QEnv{"ChallengeTokenParam"}">$Text{"Switch to agent"}</a>
                            </td>
<!-- dtl:block:OverviewResultRowSwitchToUser -->
                            <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 Agent"}</h2>
<!-- dtl:block:HeaderAdd -->
<!-- dtl:block:HeaderEdit -->
                <h2>$Text{"Edit Agent"}</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="$QData{"Action"}Action"/>
                    <input type="hidden" name="UserID" value="$QData{"UserID"}"/>
                    <input type="hidden" name="Search" value="$QData{"Search"}"/>
                    <fieldset class="TableLike">

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

                        <label class="Mandatory" for="UserFirstname"><span class="Marker">*</span> $Text{"Firstname"}:</label>
                        <div class="Field">
                            <input type="text" name="UserFirstname" id="UserFirstname" value="$QData{"UserFirstname"}" class="W50pc Validate_Required $QData{"UserFirstnameInvalid"}" maxlength="100"/>
                            <div id="UserFirstnameError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            <div id="UserFirstnameServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="UserLastname"><span class="Marker">*</span> $Text{"Lastname"}:</label>
                        <div class="Field">
                            <input type="text" name="UserLastname" id="UserLastname" value="$QData{"UserLastname"}" class="W50pc Validate_Required $QData{"UserLastnameInvalid"}" maxlength="100"/>
                            <div id="UserLastnameError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            <div id="UserLastnameServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="UserLogin"><span class="Marker">*</span> $Text{"Username"}:</label>
                        <div class="Field">
                            <input type="text" name="UserLogin" id="UserLogin" value="$QData{"UserLogin"}" class="W50pc Validate_Required $QData{"UserLoginInvalid"}" maxlength="200"/>
                            <div id="UserLoginError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                            <div id="UserLoginServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                        </div>
                        <div class="Clear"></div>

                        <label class="$QData{"ClassMandatory"}" for="UserPw">
<!-- dtl:block:MarkerMandatory -->
                            <span class="Marker">*</span>
<!-- dtl:block:MarkerMandatory -->
                            $Text{"Password"}:
                        </label>
                        <div class="Field">
                            <input type="password" name="UserPw" id="UserPw" value="" class="W50pc $QData{"UserPwRequired"} $QData{"UserPwInvalid"} " maxlength="100"/>
                            <div id="UserPwError" class="TooltipErrorMessage"><p>$Text{"Password is required."}</p></div>
                            <div id="UserPwServerError" class="TooltipErrorMessage"><p>$Text{"Password is required."}</p></div>
                        </div>
                        <div class="Clear"></div>

                        <label class="Mandatory" for="UserEmail"><span class="Marker">*</span> $Text{"Email"}:</label>
                        <div class="Field">
                            <input type="text" name="UserEmail" id="UserEmail" value="$QData{"UserEmail"}" class="W50pc Validate_Email Validate_Required $QData{"UserEmailInvalid"}" maxlength="250"/>
                            <div id="UserEmailError" class="TooltipErrorMessage"><p>$Text{"This field is required and needs to be a valid email address."}</p></div>
<!-- dtl:block:UserEmailServerErrorMsg -->
                            <div id="UserEmailServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
<!-- dtl:block:UserEmailServerErrorMsg -->
<!-- dtl:block:UserEmailInvalidConfigServerErrorMsg -->
                            <div id="UserEmailServerError" class="TooltipErrorMessage"><p>$Text{"This email address is not allowed due to the system configuration."}</p></div>
<!-- dtl:block:UserEmailInvalidConfigServerErrorMsg -->
<!-- dtl:block:UserEmailInvalidDNSServerErrorMsg -->
                            <div id="UserEmailServerError" class="TooltipErrorMessage"><p>$Text{"DNS problem, please check your configuration and the error log."}</p></div>
<!-- dtl:block:UserEmailInvalidDNSServerErrorMsg -->
<!-- dtl:block:UserEmailInvalidMXServerErrorMsg -->
                            <div id="UserEmailServerError" class="TooltipErrorMessage"><p>$Text{"This email address failed MX check."}</p></div>
<!-- dtl:block:UserEmailInvalidMXServerErrorMsg -->
<!-- dtl:block:UserEmailInvalidSyntaxServerErrorMsg -->
                            <div id="UserEmailServerError" class="TooltipErrorMessage"><p>$Text{"The syntax of this email address is incorrect."}</p></div>
<!-- dtl:block:UserEmailInvalidSyntaxServerErrorMsg -->
                        </div>
                        <div class="Clear"></div>

                        <label for="ValidID">$Text{"Validity"}:</label>
                        <div class="Field">
                            $Data{"ValidOption"}
                        </div>
                        <div class="Clear"></div>

<!-- dtl:block:Item -->
<!-- dtl:block:InputKey -->
                        <label for="$QData{"Name"}">$Text{"$Data{"Label"}"} $Text{"$Data{"Key"}"}:</label>
                        <div class="Field">
                            <input type="text" name="$QData{"Name"}" value="$QData{"SelectedID"}" class="W50pc"/>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:InputKey -->
<!-- dtl:block:Input -->
                        <label for="$QData{"Name"}">$Text{"$Data{"Label"}"}:</label>
                        <div class="Field">
                            <input type="text" name="$QData{"Name"}" id="$QData{"Name"}" value="$QData{"SelectedID"}" class="W50pc"/>
                            <p class="FieldExplanation">
                                $Text{"$Data{"Desc"}"}
                            </p>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:Input -->
<!-- dtl:block:Option -->
                        <label for="$QData{"Name"}">$Text{"$Data{"Label"}"}:</label>
                        <div class="Field">
                            $Data{"Option"}
                            <p class="FieldExplanation">
                                $Text{"$Data{"Key"}"}
                            </p>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:Option -->
<!-- dtl:block:Upload -->
                        <label for="$QData{"Name"}">$Text{"$Data{"Label"}"} $Text{"$Data{"Key"}"}</label>
                        <div class="Field">
                            <input name="$QData{"Name"}" type="file" size="30" class="fixed"/><br/>
                            <a href="">$QData{"Filename"}</a>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:Upload -->
<!-- dtl:block:Password -->
                        <label for="$QData{"Name"}">$Text{"$Data{"Label"}"} $Text{"$Data{"Key"}"}:</label>
                        <div class="Field">
                            <input type="password" name="$QData{"Name"}" value="" class="W50pc"/>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:Password -->
<!-- dtl:block:OutOfOffice -->
                        <label>$Text{"$Data{"Label"}"}:</label>
                        <div class="Field">
                            <p>
                                <input type="radio" name="OutOfOffice" id="OutOfOfficeOn" value="1" $Data{"OutOfOfficeOn"} />
                                <label for="OutOfOfficeOn">$Text{"On"}</label>
                                <input type="radio" name="OutOfOffice" id="OutOfOfficeOff" value="0" $Data{"OutOfOfficeOff"} />
                                <label for="OutOfOfficeOff">$Text{"Off"}</label>
                            </p>
                            <p class="SpacingTopSmall">
                                $Text{"Start"}: $Data{"OptionStart"}
                            </p>
                            <p class="SpacingTopSmall">
                                $Text{"End"}: $Data{"OptionEnd"}
                            </p>
                            <p class="FieldExplanation">
                                $Text{"$Data{"Desc"}"}
                            </p>
                        </div>
                        <div class="Clear"></div>
<!-- dtl:block:OutOfOffice -->
<!-- dtl:block:Item -->
                        <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 -->
