# --
# AdminProcessManagementTransition.dtl - provides HTML for AdminProcessManagement
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminProcessManagementTransition.dtl,v 1.15 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='TransitionForm' action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
                <input type="hidden" name="Action" value="$Env{"Action"}"/>
                <input type="hidden" name="Subaction" value="Transition$QData{"Action"}Action"/>
                <input type="hidden" name="EntityID" value="$QData{"EntityID"}"/>
                <input type="hidden" name="ID" value="$QData{"ID"}"/>
                <input type="hidden" name="ActivityDialogs" value=""/>
                <input type="hidden" name="ConditionConfig" value=""/>
                <input type="hidden" name="PopupRedirect" value="" id="PopupRedirect"/>
                <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 transition will affect the following processes"}: $QData{"ProcessList"}</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{"Transition"}</h2>
                    </div>
                    <div class="Content">
                        <fieldset class="TableLike">
                            <label class="Mandatory" for="Name"><span class="Marker">*</span> $Text{"Transition 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>
                        </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{"Conditions"}</h2>
                    </div>
                    <div class="Content LayoutGrid">
                        <fieldset class="TableLike FixedLabel" id="PresentConditionsContainer">
                            <label for="OverallConditionLinking">$Text{"Type of Linking between Conditions"}:</label>
                            <div class="Field">
                                $Data{"OverallConditionLinking"}
                            </div>
                            <br />
                            <div class="Clear"></div>
<!-- dtl:block:ConditionItemEditRow -->
                            <label for="Condition[$QData{"Index"}]">$Text{"Condition"} $QData{"Index"}:</label>
                            <div class="Field ConditionField" id="Condition[$QData{"Index"}]">
                                <button class="Remove" type="button" name="ConditionRemove[$QData{"Index"}]" title="$Text{"Remove this Condition"}">
                                    $Text{"Remove this Condition"}
                                </button>
                                <div class="Condition">
                                    <fieldset class="TableLike FixedLabelSmall">
                                        <label for="ConditionLinking[$QData{"Index"}]">$Text{"Type of Linking"}:</label>
                                        <div class="Field">
                                            $Data{"ConditionLinking"}
                                        </div>
                                        <div class="Clear"></div>
                                        <label>$Text{"Fields"}:</label>
                                        <div class="Field">
<!-- dtl:block:ConditionItemEditRowField -->
                                            <fieldset class="Fields">
                                                <label for="ConditionFieldName[$QData{"Index"}][$QData{"FieldIndex"}]">$Text{"Name"}:</label>
                                                <input type="text" name="ConditionFieldName[$QData{"Index"}][$QData{"FieldIndex"}]" class="Validate_Required" value="$QData{"FieldIndex"}" id="ConditionFieldName[$QData{"Index"}][$QData{"FieldIndex"}]" />
                                                <label for="ConditionFieldType[$QData{"Index"}][$QData{"FieldIndex"}]">$Text{"Type"}:</label>
                                                $Data{"ConditionFieldType"}
                                                &nbsp;<label for="ConditionFieldValue[$QData{"Index"}][$QData{"FieldIndex"}]">$Text{"Value"}:</label>
                                                <input type="text" name="ConditionFieldValue[$QData{"Index"}][$QData{"FieldIndex"}]" class="Validate_Required" value="$QData{"Match"}" id="ConditionFieldValue[$QData{"Index"}][$QData{"FieldIndex"}]" />
                                                <button class="Remove" type="button" name="ConditionFieldRemove[$QData{"Index"}][$QData{"FieldIndex"}]" title="$Text{"Remove this Field"}">
                                                    $Text{"Remove this Field"}
                                                </button>
                                                <div id="ConditionFieldName[$QData{"Index"}][$QData{"FieldIndex"}]Error" class="TooltipErrorMessage">
                                                    $Text{"This field is required."}
                                                </div>
                                                <div id="ConditionFieldValue[$QData{"Index"}][$QData{"FieldIndex"}]Error" class="TooltipErrorMessage">
                                                    $Text{"This field is required."}
                                                </div>
                                            </fieldset>
<!-- dtl:block:ConditionItemEditRowField -->
                                            <button class="Add ConditionFieldAdd" type="button" title="$Text{"Add a new Field"}">
                                                $Text{"Add a new Field"}
                                            </button>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="Clear"></div>
                            </div>
<!-- dtl:block:ConditionItemEditRow -->

<!-- dtl:block:ConditionItemInitRow -->
                            <label for="Condition[1]">$Text{"Condition"} 1:</label>
                            <div class="Field ConditionField" id="Condition[1]">
                                <div class="Condition">
                                    <fieldset class="TableLike FixedLabelSmall">
                                        <label for="ConditionLinking[1]">$Text{"Type of Linking"}:</label>
                                        <div class="Field">
                                            $Data{"ConditionLinking"}
                                        </div>
                                        <div class="Clear"></div>
                                        <label>$Text{"Fields"}:</label>
                                        <div class="Field">
                                            <fieldset class="Fields">
                                                <label for="ConditionFieldName[1][1]">$Text{"Name"}:</label>
                                                <input type="text" name="ConditionFieldName[1][1]" class="Validate_Required" id="ConditionFieldName[1][1]" />
                                                <label for="ConditionFieldType[1][1]">$Text{"Type"}:</label>
                                                $Data{"ConditionFieldType"}
                                                &nbsp;<label for="ConditionFieldValue[1][1]">$Text{"Value"}:</label>
                                                <input type="text" name="ConditionFieldValue[1][1]"  class="Validate_Required" id="ConditionFieldValue[1][1]" />
                                                <button class="Remove" type="button" name="ConditionFieldRemove[1][1]" title="$Text{"Remove this Field"}">
                                                    $Text{"Remove this Field"}
                                                </button>
                                                <div id="ConditionFieldName[1][1]Error" class="TooltipErrorMessage">
                                                    $Text{"This field is required."}
                                                </div>
                                                <div id="ConditionFieldValue[1][1]Error" class="TooltipErrorMessage">
                                                    $Text{"This field is required."}
                                                </div>
                                            </fieldset>
                                            <button class="Add ConditionFieldAdd" type="button" title="$Text{"Add a new Field"}">
                                                $Text{"Add a new Field"}
                                            </button>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="Clear"></div>
                            </div>
<!-- dtl:block:ConditionItemInitRow -->
                            <button type="button" id="ConditionAdd">$Text{"Add New Condition"}</button>
                        </fieldset>
                    </div>
                </div>
            </form>
            <div id="ConditionContainer" style="display:none;">
                <label for="Condition[_INDEX_]">$Text{"Condition"} _INDEX_:</label>
                <div class="Field ConditionField" id="Condition[_INDEX_]">
                    <button class="Remove" type="button" name="ConditionRemove[_INDEX_]" title="$Text{"Remove this Condition"}">
                        $Text{"Remove this Condition"}
                    </button>
                    <div class="Condition">
                        <fieldset class="TableLike FixedLabelSmall">
                            <label for="ConditionLinking[_INDEX_]">$Text{"Type of Linking"}:</label>
                            <div class="Field">
                                $Data{"FreshConditionLinking"}
                            </div>
                            <div class="Clear"></div>
                            <label>$Text{"Fields"}:</label>
                            <div class="Field">
                                <fieldset class="Fields">
                                    <label for="ConditionFieldName[_INDEX_][1]">$Text{"Name"}:</label>
                                    <input type="text" name="ConditionFieldName[_INDEX_][1]" class="Validate_Required" id="ConditionFieldName[_INDEX_][1]" />
                                    <label for="ConditionFieldType[_INDEX_][1]">$Text{"Type"}:</label>
                                    $Data{"FreshConditionFieldType"}
                                    &nbsp;<label for="ConditionFieldValue[_INDEX_][1]">$Text{"Value"}:</label>
                                    <input type="text" name="ConditionFieldValue[_INDEX_][1]" class="Validate_Required" id="ConditionFieldValue[_INDEX_][1]" />
                                    <button class="Remove" type="button" name="ConditionFieldRemove[_INDEX_][1]" title="$Text{"Remove this Field"}">
                                        $Text{"Remove this Field"}
                                    </button>
                                    <div id="ConditionFieldName[_INDEX_][1]Error" class="TooltipErrorMessage">
                                        $Text{"This field is required."}
                                    </div>
                                    <div id="ConditionFieldValue[_INDEX_][1]Error" class="TooltipErrorMessage">
                                        $Text{"This field is required."}
                                    </div>
                                </fieldset>
                                <button type="button" class="Add ConditionFieldAdd" title="$Text{"Add a new Field"}">
                                    $Text{"Add a new Field"}
                                </button>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </div>
            <div id="ConditionFieldContainer" style="display:none;">
                <fieldset class="Fields">
                    <label for="ConditionFieldName[_INDEX_][_FIELDINDEX_]">$Text{"Name"}:</label>
                    <input type="text" name="ConditionFieldName[_INDEX_][_FIELDINDEX_]" class="Validate_Required" id="ConditionFieldName[_INDEX_][_FIELDINDEX_]" />
                    <label for="ConditionFieldType[_INDEX_][_FIELDINDEX_]">$Text{"Type"}:</label>
                    $Data{"FreshConditionFieldType"}
                    &nbsp;<label for="ConditionFieldValue[_INDEX_][_FIELDINDEX_]">$Text{"Value"}:</label>
                    <input type="text" name="ConditionFieldValue[_INDEX_][_FIELDINDEX_]" class="Validate_Required" id="ConditionFieldValue[_INDEX_][_FIELDINDEX_]" />
                    <button class="Remove" type="button" name="ConditionFieldRemove[_INDEX_][_FIELDINDEX_]" title="$Text{"Remove this Field"}">
                        $Text{"Remove this Field"}
                    </button>
                    <div id="ConditionFieldName[_INDEX_][_FIELDINDEX_]Error" class="TooltipErrorMessage">
                        $Text{"This field is required."}
                    </div>
                    <div id="ConditionFieldValue[_INDEX_][_FIELDINDEX_]Error" class="TooltipErrorMessage">
                        $Text{"This field is required."}
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
    <div class="Footer">
        <button class="Primary" id="Submit" title="$Text{"Submit"}" type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
    </div>
</div>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
Core.Agent.Admin.ProcessManagement.InitTransitionEdit();

// Localizations
Core.Agent.Admin.ProcessManagement.Localization = {
    EditConfirm: "$Text{"As soon as you use this button or link, you will leave this screen and its current state will be saved automatically. Do you want to continue?"}"
};
//]]></script>
<!--dtl:js_on_document_complete-->
