<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Decisoes.ascx.vb" Inherits="WebFoundations.WFWorkflow.UI.Decisoes" %>
<%@ Register Src="~/WFControls/UserSelect.ascx" TagName="UserSelect" TagPrefix="uc1" %>
<script>
    var hidDecisionClickedId = 'hidDecisionClicked';
    var _SubmitClicked = false;
    function DisableAndSubmit(parControl) {
        if (_SubmitClicked == false) {
            _SubmitClicked = true;
            if (hidDecisionClickedId) {
                var hidDecisionClicked = document.getElementById(hidDecisionClickedId);
                if (hidDecisionClicked) hidDecisionClicked.value = 'true';
            }
            $(document.body).addClass('loading');
            return true;
        } else {
            parControl.disabled = true;
            return false;
        }
    }
</script>

<asp:Panel ID="pnlDecisoes" runat="server">
    <div class="geralForm">
        <asp:Panel ID="pnlMensagem" CssClass="itemFormDecisao" runat="server">
            <div class="textAreaDecisao">
                <div class="mensagemDecisao">
                    <asp:PlaceHolder ID="phMensagem" runat="server" />
                </div>
            </div>
        </asp:Panel>
    </div>
    <dl class="decisions">
        <asp:Repeater ID="lstdecisoes" runat="server">
            <ItemTemplate>
                <dd>
                    <asp:Button ID="btndecisao" CssClass="decision" OnClientClick="return DisableAndSubmit(this);" runat="server" /></dd>
            </ItemTemplate>
        </asp:Repeater>
    </dl>
</asp:Panel>

<asp:Panel ID="pnlDelegar" runat="server">
    <table border="0" cellpadding="5" cellspacing="0" width="100%">
        <tr>
            <td class="titulo_center">
                <asp:Label ID="lbldelegar" runat="server"></asp:Label></td>
        </tr>
        <tr>
            <td class="campo_center">
                <asp:DropDownList ID="lstdelegar" runat="server"></asp:DropDownList>
                <uc1:UserSelect ID="UserPicker" Width="250" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btndelegar" runat="server" CssClass="btn_itemProcesso" />
            </td>
        </tr>
    </table>
</asp:Panel>
