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

<%@ Register TagPrefix="wff" Namespace="WebFoundations.WFWorkflow.Services.UI" Assembly="WebFoundations.WFWorkflow.Services" %>
<%@ Register Assembly="WebFoundations.ServerControls" Namespace="WebFoundations.ServerControls" TagPrefix="wff" %>
<%@ Register Src="~/WFAdmin/WFWorkflow/Components/OutputsByStatusCode.ascx" TagPrefix="wf" TagName="OutputsByStatusCode" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <asp:Label Text="" ID="lblModuleName" runat="server" /></h1>
    <div class="fields no-columns mod-soap-config">
        <label class="name">
            <asp:Label ID="lblnome" runat="server" />
            <asp:TextBox ID="txtnome" runat="server" MaxLength="50" />
            <asp:RequiredFieldValidator ID="rfvName" runat="server" Display="Dynamic" ControlToValidate="txtnome" />
        </label>
        <label class="soap-url">
            <asp:Label ID="lblUrl" runat="server" />
            <asp:TextBox ID="txtUrl" ValidationGroup="tstEndPoint" runat="server" MaxLength="300" />
            <asp:RequiredFieldValidator ID="rfvUrl" runat="server" ValidationGroup="tstEndPoint" Display="Dynamic" ControlToValidate="txtUrl" />
            <asp:RegularExpressionValidator ID="rexUrl" runat="server" ControlToValidate="txtUrl" Display="Dynamic" ValidationGroup="tstEndPoint"
                ValidationExpression="(http|https|HTTP|HTTPS):\/\/[a-zA-Z0-9\/\.\-\:_]*\.?(asmx|ASMX|wso|WSO|svc|SVC)*\??(wsdl|WSDL)?" />
        </label>

        <fieldset id="fldAutenticacao" class="soap-auth">
            <legend><asp:Label ID="lblAutenticacaoWS" runat="server" Text="Autenticação de Usuário" /></legend>
            <asp:RadioButtonList ID="rdlTipoAutenticacao" runat="server" RepeatLayout="UnorderedList" AutoPostBack="true">
                <asp:ListItem Value="0" Selected="true"></asp:ListItem>
                <asp:ListItem Value="1"></asp:ListItem>
                <asp:ListItem Value="2"></asp:ListItem>
            </asp:RadioButtonList>
            <asp:Panel ID="pnlAuthentication" runat="server" Visible="false">
                <asp:Label ID="lblAutenticacaoUsuario" runat="server" Style="float: left !important;" Width="60px" />
                <asp:RequiredFieldValidator ID="rfvUsuario" runat="server" ValidationGroup="tstEndPoint" Display="Dynamic" ControlToValidate="txtUsuario" Text="*" />
                <asp:TextBox ID="txtUsuario" runat="server" MaxLength="50" ClientIDMode="Static" AutoCompleteType="None" />
                <asp:Label ID="lblAutenticacaoSenha" runat="server" />
                <asp:RequiredFieldValidator ID="rfvSenha" runat="server" ValidationGroup="tstEndPoint" Display="Dynamic" ControlToValidate="txtSenha" Text="*" />
                <asp:TextBox ID="txtSenha" runat="server" TextMode="Password" MaxLength="20" ClientIDMode="Static" AutoCompleteType="None" />
            </asp:Panel>
        </fieldset>

        <asp:Button ID="btnCheckUrl" runat="server" ValidationGroup="tstEndPoint" />

        <fieldset id="fldEndpoint" style="display: none;">
            <asp:DropDownList ID="ddlEndpoint" runat="server" ClientIDMode="Static"></asp:DropDownList>
        </fieldset>

        <label id="trMethods" runat="server" visible="false">
            <asp:Label ID="lblMethodName" runat="server" />
            <asp:DropDownList ID="ddlMethod" AutoPostBack="true" CssClass="" runat="server" />
        </label>

        <label id="trParams" runat="server" visible="false">
            <asp:Panel ID="pnlparams" runat="server">
                <table>
                    <thead>
                        <tr>
                            <th>
                                <asp:Label ID="lblParams" runat="server" /></th>
                            <th>
                                <asp:Label ID="lblParamsType" runat="server" /></th>
                            <th>
                                <asp:Label ID="lblRun" runat="server" /></th>
                            <th>
                                <asp:Label ID="lblTest" runat="server" /></th>
                        </tr>
                    </thead>
                    <asp:Repeater ID="rptParams" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Label ID="lblParName" runat="server" /></td>
                                <td>
                                    <asp:Label ID="lblParType" runat="server" Visible="true" /></td>
                                <td>
                                    <wff:zurivaluepicker id="ddlParValue" dropdownautowidth="enabled" width="100%" pagersize="10" runat="server" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtParTestValue" runat="server" Width="60px">NULL</asp:TextBox></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </asp:Panel>
            <asp:Button ID="btnTestWeb" Visible="false" runat="server" />
        </label>

        <asp:PlaceHolder ID="phResult" runat="server">
            <fieldset class="soap-attachment">
                <legend>Attachment</legend>
                <label class="add-attachment">
                    <asp:CheckBox ID="chkAddXml" CssClass="checkbox" runat="server" Enabled="false" />
                </label>
                <label class="attachment-alias">
                    <asp:Label ID="lblalias" runat="server" />
                    <asp:TextBox ID="txtalias" runat="server" MaxLength="50" />
                    <asp:RegularExpressionValidator ID="vlalias" runat="server" ControlToValidate="txtalias" ValidationExpression="[A-Za-z][A-Za-z0-9_-]*" />
                </label>
                <label class="attachment-access">
                    <asp:Label ID="lblAcesso" runat="server" />
                    <wff:AccessList ID="lstAcesso" DisableItems="-7;-6;-5;-4;-3;-2;" EnableUser="true"
                        EnableRole="true" EnableRoleGroup="true" runat="server" />
                </label>
            </fieldset>
            <wf:OutputsByStatusCode runat="server" id="serviceOutputs" />
        </asp:PlaceHolder>
    </div>

    <section class="actions">
        <asp:Button ID="btnOk" runat="server" />
        <input id="btnCancel" type="button" value="button" runat="server" />
    </section>
</asp:Content>
