# --
# AdminProcessManagementActivityDialog.dtl - provides HTML for AdminProcessManagement
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminProcessManagementActivityDialog.dtl,v 1.17 2012/11/27 11:58:08 mn 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.
# --

<div class="LayoutPopup ARIARoleMain">
    <div class="Header">
        <h1>$Text{"$Data{"Title"}"}</h1>
<!-- dtl:block:ClosePopup -->
        <p>
            <a href="$Env{"Baselink"}Action=$Env{"Action"};Subaction=ClosePopup" class="ClosePopup">$Text{"Cancel & close window"}</a>
        </p>
<!-- dtl:block:ClosePopup -->
<!-- dtl:block:GoBack -->
        <p>
            <a class="GoBack" href="$Env{"Baselink"}Action=$LQData{"Action"};Subaction=$LQData{"Subaction"};ID=$LQData{"ID"};EntityID=$LQData{"EntityID"}">&lt;- $Text{"Go Back"}</a>
        </p>
<!-- dtl:block:GoBack -->
    </div>
    <div class="Content">
        <div class="ContentColumn">
            <form id='ActivityDialogForm' action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
                <input type="hidden" name="Action" value="$Env{"Action"}"/>
                <input type="hidden" name="Subaction" value="ActivityDialog$QData{"Action"}Action"/>
                <input type="hidden" name="EntityID" value="$QData{"EntityID"}"/>
                <input type="hidden" name="ID" value="$QData{"ID"}"/>
                <input type="hidden" name="Fields" value=""/>
                <input type="hidden" name="FieldDetails" value=""/>
                <input type="hidden" name="PopupRedirect" value="" id="PopupRedirect"/>
                <input type="hidden" name="PopupRedirectAction" value="" id="PopupRedirectAction"/>
                <input type="hidden" name="PopupRedirectSubaction" value="" id="PopupRedirectSubaction"/>
                <input type="hidden" name="PopupRedirectID" value="" id="PopupRedirectID"/>
                <input type="hidden" name="PopupRedirectEntityID" value="" id="PopupRedirectEntityID"/>

<!-- dtl:block:EditWarning -->
                <div class="WidgetSimple Expanded WidgetNotice">
                    <div class="Content">$Text{"Please note that changing this activity dialog will affect the following activities"}: $QData{"ActivityList"}</div>
                </div>
<!-- dtl:block:EditWarning -->

                <div class="WidgetSimple Expanded">
                    <div class="Header">
                        <div class="WidgetAction Toggle">
                            <a href="#" title="$Text{"Show or hide the content"}"></a>
                        </div>
                        <h2>$Text{"Activity Dialog"}</h2>
                    </div>
                    <div class="Content">
                        <fieldset class="TableLike">
                            <label class="Mandatory" for="Name"><span class="Marker">*</span> $Text{"Activity dialog Name"}:</label>
                            <div class="Field">
                                <input type="text" name="Name" id="Name" value="$QData{"Name"}" class="W50pc Validate_Required $QData{"NameServerError"}" maxlength="70"/>
                                <div id="NameError" class="TooltipErrorMessage">
                                    <p>$Text{"This field is required."}</p>
                                </div>
                                <div id="NameServerError" class="TooltipErrorMessage">
                                    <p>$Text{"This field is required."}</p>
                                </div>
                            </div>
                            <div class="Clear"></div>

                            <label class="Mandatory" for="Name">$Text{"Available in"}:</label>
                            <div class="Field">
                                $Data{"InterfaceSelection"}
                            </div>
                            <div class="Clear"></div>

                            <label class="Mandatory" for="DescriptionShort"><span class="Marker">*</span> $Text{"Description (short)"}:</label>
                            <div class="Field">
                                <input type="text" name="DescriptionShort" id="DescriptionShort" value="$QData{"DescriptionShort"}" class="W50pc Validate_Required $QData{"DescriptionShortServerError"}" maxlength="70"/>
                                <div id="DescriptionShortError" class="TooltipErrorMessage">
                                    <p>$Text{"This field is required."}</p>
                                </div>
                                <div id="DescriptionShortServerError" class="TooltipErrorMessage">
                                    <p>$Text{"This field is required."}</p>
                                </div>
                            </div>
                            <div class="Clear"></div>

                            <label for="DescriptionLong">$Text{"Description (long)"}:</label>
                            <div class="Field">
                                <textarea name="DescriptionLong" id="DescriptionLong" class="W50pc" rows="10" cols="20">$QData{"DescriptionLong"}</textarea>
                            </div>
                            <div class="Clear"></div>

                            <label for="Permission">$Text{"Permission"}:</label>
                            <div class="Field">
                                $Data{"PermissionSelection"}
                            </div>
                            <div id="PermissionServerError" class="TooltipErrorMessage">
                                <p>$Text{"The selected permission does not exist."}</p>
                            </div>
                            <div class="Clear"></div>

                            <label for="RequiredLock">$Text{"Required Lock"}:</label>
                            <div class="Field">
                                $Data{"RequiredLockSelection"}
                            </div>
                            <div id="RequiredLockServerError" class="TooltipErrorMessage">
                                <p>$Text{"The selected required lock does not exist."}</p>
                            </div>
                            <div class="Clear"></div>

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

                            <label for="SubmitButtonText">$Text{"Submit Button Text"}:</label>
                            <div class="Field">
                                <input type="text" name="SubmitButtonText" id="SubmitButtonText" value="$QData{"SubmitButtonText"}" class="W50pc" maxlength="70"/>
                            </div>
                            <div class="Clear"></div>
                        </fieldset>
                    </div>
                </div>

                <div class="WidgetSimple Expanded">
                    <div class="Header">
                        <div class="WidgetAction Toggle">
                            <a href="#" title="$Text{"Show or hide the content"}"></a>
                        </div>
                        <h2>$Text{"Fields"}</h2>
                    </div>
                    <div class="Content LayoutGrid">
                        <div class="Size1of1 SpacingBottom">
                            <p>
                                $Text{"You can assign Fields to this Activity Dialog by dragging the elements with the mouse from the left list to the right list."}
                                $Text{"Ordering the elements within the list is also possible by drag 'n' drop."}
                            </p>
                        </div>
                        <div class="Size1of2">
                            <input type="text" id="FilterAvailableFields" class="W75pc" name="FilterAvailableFields" value="" title="$Text{"Filter available fields"}" placeholder="$Text{"Filter available fields"}..." />
                            <ul class="Tablelike W90pc SpacingTop">
                                <li class="Header">
                                    $Text{"Available Fields"}
                                </li>
                            </ul>
                            <ul class="AllocationList Tablelike W90pc" id="AvailableFields">
<!-- dtl:block:AvailableFieldRow -->
                                <li title="Name: $QData{"Field"}" data-id="$QData{"Field"}" data-config="">
                                    $QData{"Field", "55"}
                                    <span class="Functions ShowOnAssignedList"><a href="#" class="FieldDetailsOverlay" data-id="$QData{"Field"}" data-entity="$QData{"Field"}">$Text{"Edit"}</a></span>
                                </li>
<!-- dtl:block:AvailableFieldRow -->
                            </ul>
                        </div>
                        <div class="Size1of2">
                            <ul class="Tablelike W90pc">
                                <li class="Header">
                                    $Text{"Assigned Fields"}
                                </li>
                            </ul>
                            <ul class="AllocationList Tablelike W90pc" id="AssignedFields">
<!-- dtl:block:AssignedFieldRow -->
                                <li data-id="$QData{"Field"}" data-entity="$QData{"Field"}" data-config='$Data{"FieldConfig"}' title="Name: $QData{"Field"}">
                                    $QData{"Field"}
                                    <span class="Functions ShowOnAssignedList"><a href="#" class="FieldDetailsOverlay" data-id="$QData{"Field"}" data-entity="$QData{"Field"}">$Text{"Edit"}</a></span>
                                </li>
<!-- dtl:block:AssignedFieldRow -->
                            </ul>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="Footer">
        <button class="Primary" id="Submit" title="$Text{"Submit"}" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
    </div>
</div>

<div id="Dialogs" class="Hidden">
    <div id="FieldDetails">
        <div style="width: 500px;">
            <h2>$Text{"Edit Details for Field"} "<span id="DialogFieldName"></span>"</h2>
            <fieldset class="TableLike">
                <label for="DescShort">$Text{"Description (short)"}:</label>
                <div class="Field">
                    <input type="text" name="DescShort" id="DescShort" value="" class="W50pc" maxlength="70"/>
                </div>
                <div class="Clear"></div>

                <label for="DescLong">$Text{"Description (long)"}:</label>
                <div class="Field">
                    <textarea name="DescLong" id="DescLong" class="W50pc"></textarea>
                </div>
                <div class="Clear"></div>

                <label for="DefaultValue">$Text{"Default value"}:</label>
                <div class="Field">
                    <input type="text" name="DefaultValue" id="DefaultValue" value="" class="W50pc" />
                </div>
                <div class="Clear"></div>
            </fieldset>

            <div id="ArticleTypeContainer" class='Hidden'>
                <fieldset class="TableLike">
                    <label for="ArticleType">$Text{"ArticleType"}:</label>
                    <div class="Field">
                        $Data{"ArticleTypeSelection"}
                    </div>
                    <div class="Clear"></div>
                </fieldset>
            </div>

            <fieldset class="TableLike">
                <label for="Display">$Text{"Display"}:</label>
                <div class="Field">
                    $Data{"DisplaySelection"}
                </div>
                <div class="Clear"></div>
            </fieldset>
        </div>
    </div>
</div>

<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
Core.Agent.Admin.ProcessManagement.InitActivityDialogEdit();

//Localizations
Core.Agent.Admin.ProcessManagement.Localization = {
        CancelMsg: "$Text{"Cancel"}",
        SaveMsg: "$Text{"Save"}",
        DialogTitle: "$Text{"Edit Field Details"}"
};
//]]></script>
<!--dtl:js_on_document_complete-->
