<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExtPayeeCapture.ascx.cs" Inherits="APC.Forms.UserControls.ExtPayeeCapture" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<ext:Panel ID="pnlPayeeFormContainer" Header="false" BodyBorder="0" Border="false" runat="server">
<Items>
    <ext:FormPanel 
        ID="FormPayeePanel" 
        runat="server"
        BodyPadding="0"
        DefaultAnchor="100%" Header="false" BodyBorder="0" Border="true" Height="430" AutoScroll="false"  BodyStyle="overflow-x:hidden">
        <FieldDefaults MsgTarget="Side" LabelWidth="180" />
        <Items>
             <ext:TextField ID="txtPayeeName" runat="server" FieldLabel="Name (Organization/Individual)" Name="PayeeName" Padding="2" AllowBlank="false" />
             <ext:Container ID="Container3" runat="server" Layout="ColumnLayout">  
             <Items>
             <ext:TextField ID="txtPayeeEmail" runat="server" FieldLabel="Email Address" Name="PayeeEmail" Vtype="email" Padding="2" ColumnWidth=".5" AllowBlank="false" ></ext:TextField>
             <ext:TextField ID="txtPayeePhone" runat="server" FieldLabel="Phone Number" Name="PayeePhone" EmptyText="+xx-xxx-xxx-xxxx" MaskRe="[\d\-]" RegexText="Must be in the format +xx-xxx-xxx-xxxx" Padding="2" ColumnWidth=".5" LabelWidth="90" AllowBlank="false"></ext:TextField>
             </Items>
             </ext:Container>
                        <ext:Container ID="Container4" runat="server" Layout="FormLayout">  
           <Items>
            <ext:Panel ID="pnlPayeeBankInfo" Title="Banking Information" runat="server" AutoScroll="true">
            <Items>
                <ext:UserControlLoader ID="BankControl" Path="~/Forms/UserControls/MstIntBankAccountList.ascx" runat="server" />            
            </Items>
            </ext:Panel>
            </Items>
            </ext:Container>
             <ext:Container ID="Container1" runat="server" Layout="FormLayout">  
             <Items>
                <ext:TextArea ID="txtPayeeAddress" runat="server" FieldLabel="Address" Name="PayeeAddress" AutoScroll="true" Padding="2" LabelAlign="Top" AllowBlank="false"/>
             </Items>
             </ext:Container>
             <ext:ComboBox ID="cmbPayeeProject" runat="server" Name="PayeeProject" FieldLabel="Project" EmptyText="Select a Project" DisplayField="Description" ValueField="Value" TypeAhead="true" ValueNotFoundText="Loading..." QueryMode="Local" Editable="false" AllowBlank="true">
            <ListConfig MinWidth="400" />
            <Store>
                    <ext:Store ID="ProjectStore" runat="server">
                    <Model>
                        <ext:Model ID="ProjectModel" runat="server" IDProperty="Value">
                            <Fields>
                                <ext:ModelField Name="Value" Type="String" Mapping="Value" />
                                <ext:ModelField Name="Description" Type="String" Mapping="Description" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
          </Store>
          </ext:ComboBox>
             <ext:Container ID="Container2" runat="server" Layout="FormLayout">  
            <Items>
            <ext:TextArea ID="txtPayeeNotes" runat="server" FieldLabel="Notes" Height="60" Name="Notes" AutoScroll="true" LabelAlign="Top" AllowBlank="true"/>
            </Items>
            </ext:Container>
        </Items>
         <Buttons>
            <ext:Button runat="server" Text="OK" ID="btnOK">
            <DirectEvents>
                <Click OnEvent="SaveRecord" Before="return #{FormPayeePanel}.isValid();" Success="parent.Ext.WindowMgr.getActive().close();">
                <ExtraParams>
                    <ext:Parameter Name="values" Value="#{FormPayeePanel}.getForm().getValues()" Mode="Raw" Encode="true"/>
                </ExtraParams>
                </Click>
            </DirectEvents>

            </ext:Button>
            <ext:Button ID="btnCancel" runat="server" Text="Cancel" Handler="parent.Ext.WindowMgr.getActive().close();"/>
            </Buttons>
    </ext:FormPanel>
</Items>
</ext:Panel>
