<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/ModalAdminPage.master" CodeBehind="Etapa.aspx.vb" Inherits="WebFoundations.WFWorkflow.UI.Etapa" %>
<%@ Register TagPrefix="wff" Namespace="WebFoundations.WFWorkflow.Services.UI" Assembly="WebFoundations.WFWorkflow.Services" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/WFControls/UserSelect.ascx" TagName="UserSelect" TagPrefix="uc1" %>
<%@ Register Src="~/WFControls/RoleSelect.ascx" TagName="RoleSelect" TagPrefix="uc1" %>
<%@ Register Src="~/WFControls/AccessList.ascx" TagName="AccessList" TagPrefix="uc2" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <asp:Literal ID="lblModuleName" runat="server" Text="Etapa" /></h1>
    <telerik:RadTabStrip RenderMode="Lightweight" runat="server" ID="tbConfig" MultiPageID="configPages" CausesValidation="false" SelectedIndex="0">
        <tabs>
            <telerik:RadTab Text="Definições"></telerik:RadTab>
            <telerik:RadTab Text="Mensagem"></telerik:RadTab>
            <telerik:RadTab Text="SLA"></telerik:RadTab>
            <telerik:RadTab Text="Avançadas"></telerik:RadTab>
            <telerik:RadTab Text="Jornada"></telerik:RadTab>
        </tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="configPages" SelectedIndex="0">
        <telerik:RadPageView runat="server" ID="Configuracoes">
            <div class="fields">
                <label>
                    <asp:Label ID="lblNome" runat="server" />
                    <asp:TextBox ID="txtNome" runat="server" MaxLength="100" />
                    <asp:RequiredFieldValidator ID="obrNome" runat="server" ControlToValidate="txtNome" Display="Dynamic" />
                </label>
                <label>
                    <asp:CheckBox ID="chketapas" CssClass="checkbox" runat="server" AutoPostBack="True" />
                </label>
                <label>
                    <asp:Label ID="lblAccessList" runat="server" />
                    <asp:UpdatePanel ID="pnlacesso" class="fill-width" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:PlaceHolder ID="Acesso" runat="server">
                                <uc2:AccessList ID="listaacesso" DisableItems="-7;-6;-5;-4;-3" EnableUser="true" EnableRole="true" EnableRoleGroup="true" runat="server" />
                            </asp:PlaceHolder>
                            <asp:PlaceHolder ID="Etapas" Visible="false" runat="server">
                                <asp:DropDownList ID="lstetapa" runat="server" />
                            </asp:PlaceHolder>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </label>
                <label>
                    <asp:Label ID="lblUsuGestor" runat="server" />
                    <uc2:AccessList ID="aclGestores" DisableItems="-7;-6;-5;-4;-3;-2" EnableUser="true" EnableRole="true" EnableRoleGroup="false" runat="server" />
                </label>
            </div>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="Mensagem">
            <div class="fields no-columns">
                <asp:PlaceHolder id="tipoMensagem" runat="server">
                    <label>
                        <asp:Label ID="lblTipoMensagem" runat="server" />
                        <asp:DropDownList ID="ddlTipoMensagem" runat="server" CausesValidation="False" AutoPostBack="True" />
                    </label>
                </asp:PlaceHolder>
                <label>
                    <asp:PlaceHolder ID="phConfigMensagem" runat="server" />
                </label>
            </div>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="configsla">
            <asp:Repeater ID="rptSLA" runat="server">
                <HeaderTemplate>
                    <table class="sla">
                        <colgroup>
                            <col width="40%" />
                            <col width="20%" />
                            <col width="40%" />
                        </colgroup>
                        <thead>
                            <tr>
                                <th>
                                    <asp:Literal ID="lblSLA" runat="server" /></th>
                                <th>
                                    <asp:Literal ID="lblUnidade" runat="server" /></th>
                                <th>
                                    <asp:Literal ID="lblPrazo" runat="server" /></th>
                            </tr>
                        </thead>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:HiddenField ID="slaID" runat="server" />
                            <div id="divCor" runat="server" class="sla-color"></div>
                            <asp:Label ID="lblSLAName" runat="server" />
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlType" runat="server" />
                        </td>
                        <td>
                            <wff:ZuriValuePicker id="ddlSLA" width="100%"  ShowZuriProperties="false" ShowPortalProperties="false" ShowActivities="false"
                                DropDownAutoWidth="enabled" PagerSize="10" runat="server" />
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="Avancadas">
            <div class="fields">
                <label>
                    <asp:Label ID="lblAlias" runat="server" />
                    <asp:TextBox ID="txtAlias" runat="server" MaxLength="100" />
                </label>
                <label>
                    <asp:CheckBox ID="chkautoexec" CssClass="checkbox" runat="server" />
                </label>
                <label>
                    <asp:CheckBox ID="chkContinuous" CssClass="checkbox" runat="server" />
                </label>
                <label>
                    <asp:CheckBox ID="chkVinculada" runat="server" CssClass="checkbox" />
                </label>
                <label>
                    <asp:CheckBox ID="chkVinculadaG" runat="server" CssClass="checkbox" />
                </label>
                <label>
                    <asp:CheckBox ID="chkAtribuicao" runat="server" CssClass="checkbox" />
                </label>
                <label>
                    <asp:CheckBox ID="chkattribreq" runat="server" CssClass="checkbox" />
                </label>
                <asp:UpdatePanel ID="pnldelega" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <label>
                            <asp:CheckBox ID="chkdelegate" runat="server" CssClass="checkbox" AutoPostBack="True" />
                        </label>
                        <asp:PlaceHolder ID="delegar" runat="server" Visible="false">
                            <label>
                                <asp:Label ID="lblgrupodelega" runat="server" />
                                <uc1:RoleSelect ID="rolepicker" runat="server" />
                            </label>
                        </asp:PlaceHolder>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="Jornada">
            <div class="config workhours">
                <div>
                    <asp:Label ID="lblsegsex" runat="server" />
                    <asp:TextBox ID="txtsegsexini" runat="server" CssClass="time" MaxLength="5" />
                    <asp:Label ID="lbla1" runat="server" />
                    <asp:TextBox ID="txtsegsexfim" CssClass="time" runat="server" MaxLength="5" />
                    <asp:RegularExpressionValidator ID="vlsegsexini" runat="server" ControlToValidate="txtsegsexini"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                    <asp:RegularExpressionValidator ID="vlsegsexfim" runat="server" ControlToValidate="txtsegsexfim"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                </div>
                <div>
                    <asp:Label ID="lblsabado" runat="server" />
                    <asp:TextBox ID="txtsabadoini" runat="server" CssClass="time" MaxLength="5" />
                    <asp:Label ID="lbla2" runat="server" />
                    <asp:TextBox ID="txtsabadofim" CssClass="time" runat="server" MaxLength="5"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="vlsabadoini" runat="server" ControlToValidate="txtsabadoini"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                    <asp:RegularExpressionValidator ID="vlsabadofim" runat="server" ControlToValidate="txtsabadofim"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                </div>
                <div>
                    <asp:Label ID="lbldomingo" runat="server" />
                    <asp:TextBox ID="txtdomingoini" runat="server" CssClass="time" MaxLength="5" />
                    <asp:Label ID="lbla3" runat="server" />
                    <asp:TextBox ID="txtdomingofim" CssClass="time" runat="server" MaxLength="5" />
                    <asp:RegularExpressionValidator ID="vldomingoini" runat="server" ControlToValidate="txtdomingoini"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                    <asp:RegularExpressionValidator ID="vldomingofim" runat="server" ControlToValidate="txtdomingofim"
                        ValidationExpression="([01]?[0-9]|2[0-3]):[0-5][0-9]" Display="Dynamic" />
                </div>
            </div>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
    <section class="actions">
        <asp:Button ID="btnok" runat="server" />
        <input id="btncancel" type="button" value="button" runat="server" />
    </section>
</asp:Content>
