<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/ModalAdminPage.master" CodeBehind="ProcessoImport.aspx.vb" Inherits="WebFoundations.WFWorkflow.UI.ProcessoImport" %>

<%@ Register Src="~/WFControls/WFPagePicker.ascx" TagName="WFPagePicker" TagPrefix="uc1" %>
<%@ Register Src="~/WFControls/UserSelect.ascx" TagName="UserSelect" TagPrefix="uc1" %>
<%@ Register Src="~/WFControls/RoleSelect.ascx" TagName="RoleSelect" TagPrefix="uc1" %>
<%@ Register Src="~/WFControls/RoleGroupSelect.ascx" TagName="RoleGroupSelect" TagPrefix="uc1" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlStart" runat="server" CssClass="fields no-columns">
        <label>
            <asp:Label ID="lblupload" runat="server" />
            <asp:FileUpload ID="fupWorkflow" runat="server" />
        </label>
        <label>
            <asp:Label ID="lblareadest" runat="server" />
            <uc1:WFPagePicker ID="portalpicker" runat="server" AddSelect="false"
                AdminMode="true" AutoSelectLast="false" ShowArea="true" ShowPage="false" NoLabels="true" />
        </label>
        <section class="actions">
            <asp:Button ID="btnUploadOk" runat="server" />
            <input id="btnUploadcancel" type="button" runat="server" />
        </section>
    </asp:Panel>
    <asp:Panel ID="pnlUpdate" Visible="false" runat="server" CssClass="fields no-columns">
        <label>
            <asp:Label ID="lblupdate" runat="server" />
            <asp:DropDownList ID="lstProcesses" runat="server" />
        </label>
        <section class="actions">
            <asp:Button ID="btnokUpdate" runat="server" CssClass="button" />
        </section>
    </asp:Panel>
    <asp:UpdatePanel ID="updImportPanel" UpdateMode="Always" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlMapping" Visible="false" runat="server" CssClass="fields no-columns">
                <table style="padding: 2px; width: 100%;" border="0">
                    <tr>
                        <td style="width: 200px;">
                            <asp:Label ID="lblname" runat="server"></asp:Label></td>
                        <td>
                            <asp:TextBox ID="txtName" runat="server" MaxLength="40" Width="300px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="obrname" runat="server" Display="Dynamic" ControlToValidate="txtName"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">&nbsp;</td>
                    </tr>
                    <asp:Repeater ID="repRoles" runat="server">
                        <HeaderTemplate>
                            <tr>
                                <td colspan="2" style="text-align: center; font-weight: bold;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                            </tr>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr>
                                <td colspan="2">&nbsp;</td>
                            </tr>
                        </FooterTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="width: 200px;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                                <td>
                                    <asp:HiddenField ID="itemValue" runat="server" />
                                    <uc1:UserSelect ID="userPicker" visible="false" Width="250" runat="server" />
                                    <uc1:RoleSelect ID="rolePicker" visible="false" Width="250" runat="server" />
                                    <uc1:RoleGroupSelect ID="roleGroupPicker" visible="false" Width="250" runat="server" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="repEntryPoints" runat="server">
                        <HeaderTemplate>
                            <tr>
                                <td colspan="2" style="text-align: center; font-weight: bold;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                            </tr>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr>
                                <td colspan="2">&nbsp;</td>
                            </tr>
                        </FooterTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="width: 200px;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                                <td>
                                    <asp:HiddenField ID="itemValue" runat="server" />
                                    <asp:DropDownList ID="lstEntradas" runat="server"></asp:DropDownList>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:Repeater ID="repSLAs" runat="server">
                        <HeaderTemplate>
                            <tr>
                                <td colspan="2" style="text-align: center; font-weight: bold;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                            </tr>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr>
                                <td colspan="2">&nbsp;</td>
                            </tr>
                        </FooterTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="width: 200px;">
                                    <asp:Label ID="lblname" runat="server"></asp:Label></td>
                                <td>
                                    <asp:HiddenField ID="itemValue" runat="server" />
                                    <asp:DropDownList ID="lstSLAs" runat="server"></asp:DropDownList>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr>
                        <td colspan="2" style="text-align: center;">
                            <asp:Button ID="btnOKImport" runat="server" CssClass="button" />&nbsp;&nbsp; &nbsp;
                            <input id="btnCancelImport" type="button" class="button" value="button" runat="server" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlResult" Visible="false" runat="server">
                <table cellpadding="5">
                    <tr>
                        <td style="text-align: center; font-weight: bold;">
                            <asp:Label ID="lblresultTitle" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <hr width="60%" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Repeater ID="rptMessages" runat="server">
                                <ItemTemplate>
                                    <asp:Label ID="lbltype" runat="server"></asp:Label>
                                    - 
                                    <asp:Label ID="lblMessage" runat="server"></asp:Label><br />
                                </ItemTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center;">
                            <input id="btnClose" type="button" class="button" value="button" runat="server" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
