<%@ control language="VB" autoeventwireup="false" inherits="RCC_O365_CC_CSPSubsDetail, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>

<div class="card">
    <div class="header">
        <div class="displayInlineBlock">
            <h3>
                <asp:Literal ID="Ltrl_ContactDetailsHeading" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SM0091%>" />
                <asp:Label ID="lbl_Contact" runat="server" Visible="false" />
            </h3>
        </div>
        <asp:LinkButton ID="Lbtn_GoBack" runat="server" Text="<%$ Resources:Content,String1018 %>" CausesValidation="false"
            class="btn btn-primary waves-effect pull-right m-t--4px" />
    </div>
    <div class="body">
        <asp:Panel ID="Pnl_TrialOpts" runat="server" Visible="false">
            <div class="row">
                <div class="col-xs-12 infoMsg YOverFlowMsg">
                    <asp:Literal ID="Ltrl_TrialMsg" runat="server"></asp:Literal>
                    &nbsp;
                    <asp:LinkButton ID="Lbtn_ConvertToPaid" CssClass="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content, StrConvertToPaid %>"></asp:LinkButton>
                </div>
                <asp:Button ID="Btn_Dummy2" runat="server" CausesValidation="false" CssClass="btn-dummy mp-hide" />
                <asp:Panel ID="Pnl_ProdConversionDetails" runat="server" CssClass="width-modal-popup-auto" Style="display: none">
                    <div class="card">
                        <div class="header container-fluid">
                            <h3 class="pull-left">
                                <asp:Literal ID="Ltrl_ProdTransition" runat="server" Text="<%$ Resources:Content,StrConversionDetails %>"></asp:Literal></h3>
                            <span>
                                <button type="button" class="close" onclick="$find('<%=MPE_ConversionDetails.ClientID%>').hide();">&times;</button>
                            </span>
                        </div>
                        <div class="body">
                            <div id="div_transitionmsg" runat="server" visible="false"></div>
                            <div class="row">
                                <div class="col-xs-12 col-md-3 row-label">
                                    <asp:Literal ID="Literal1" runat="server" Text="<% $Resources:Content,strUpgradeTo %>"></asp:Literal>
                                </div>
                                <div class="col-md-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_TargetConversionProds" runat="server" onChange="loadConversionProdOpts()"></asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <asp:Button ID="Btn_UpdateConversionProdOpts" runat="server" CssClass="btn-dummy mp-hide hide d-none btnAction" Text="" />
                            <script type="text/javascript" lang="javascript">
                                function loadConversionProdOpts() {
                                    $get('<%= Btn_UpdateConversionProdOpts.ClientID %>').click();
                                }
                            </script>
                            <ajax:UpdatePanel ID="UP_ConversionProdDetail" runat="server" UpdateMode="Conditional">
                                <Triggers>
                                    <ajax:AsyncPostBackTrigger ControlID="Btn_UpdateConversionProdOpts" EventName="Click" />
                                </Triggers>
                                <ContentTemplate>
                                    <div class="row">
                                        <div class="col-xs-12 col-md-3 row-label">
                                            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,GN00001490 %>"></asp:Literal>
                                        </div>
                                        <div class="col-xs-12 col-md-3">
                                            <asp:DropDownList ID="Ddl_ConversionBillDetails" runat="server"></asp:DropDownList>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </ajax:UpdatePanel>

                            <div class="row">
                                <div class="col-xs-12 col-md-3 row-label">
                                    <asp:Literal ID="Literal3" runat="server" Text="<% $Resources:Content,String35 %>"></asp:Literal>
                                </div>
                                <div class="col-xs-12 col-md-4">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_ConversionQty" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 col-md-3 row-label">
                                    <asp:Literal ID="Literal4" runat="server" Text="<% $Resources:Content,StrSeatReAssignment %>"></asp:Literal>
                                </div>
                                <div class="col-xs-12 col-md-4">
                                    <div class="form-group">
                                            <asp:RadioButtonList ID="Rbl_StrSeatReAssignment" runat="server"></asp:RadioButtonList>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-offset-2 col-xs-8 col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-4">
                                    <asp:Button ID="Btn_ConvertOk" runat="server" Text="<%$ Resources:Content,GN0000654%>" class="btn btn-primary waves-effect btnAction" CausesValidation="false" />
                                    <asp:Button ID="Btn_ConvertCancel" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" CausesValidation="false" />

                                </div>
                            </div>
                        </div>
                    </div>

                </asp:Panel>
                <EM:ModalPopupExtender runat="server" ID="MPE_ConversionDetails" BackgroundCssClass="modalBackground"
                    DropShadow="false" PopupControlID="Pnl_ProdConversionDetails" TargetControlID="Btn_Dummy2" CancelControlID="Btn_ConvertCancel">
                </EM:ModalPopupExtender>

            </div>
        </asp:Panel>
        <div class="row">
            <div class="col-sm-3 col-xs-12 row-label">
                *
                <asp:Literal ID="Ltrl_SubsNickName" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000616%>" />:
            </div>
            <div class="col-sm-4 col-xs-12">
                <div class="form-group">
                    <div class="form-line">
                        <asp:TextBox ID="TxBx_SubsNickName" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RFV_TxBx_SubsNickName" runat="server" ControlToValidate="TxBx_SubsNickName"
                            ValidationGroup="subsdetail" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-3 col-xs-12 row-label">
                *
                                            <asp:Literal ID="Ltrl_SubsQty" runat="server" EnableViewState="false" Text="<%$ Resources:Content,String35%>" />:
            </div>
            <div class="col-sm-4 col-xs-12">
                <div class="form-group">
                    <div class="form-line">
                        <asp:TextBox ID="TxBx_SubsQty" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RFV_TxBx_SubsQty" runat="server" ControlToValidate="TxBx_SubsQty"
                            ValidationGroup="subsdetail" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                        <EM:FilteredTextBoxExtender ID="FTE_SubQty" runat="server" FilterType="Numbers" TargetControlID="TxBx_SubsQty"></EM:FilteredTextBoxExtender>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-3 col-xs-12 row-label">
                *
                <asp:Literal ID="Ltrl_BillingDetail" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001490%>" />:
            </div>
            <div class="col-sm-4 col-xs-12">
                <div class="form-group">
                    <asp:DropDownList ID="Ddl_BillingDetail" runat="server"></asp:DropDownList>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-md-3 row-label">
                <asp:Literal ID="Ltrl_SubsStatus" runat="server" Text="<% $Resources:Content,String385 %>"></asp:Literal>
            </div>
            <div class="col-xs-12 col-md-4">
                <div class="form-group">
                    <asp:DropDownList ID="Ddl_SubsStatus" runat="server">
                        <asp:ListItem Text="<%$Resources:Content,USM0103%>" Value="1"></asp:ListItem>
                        <asp:ListItem Text="<%$Resources:Content,Suspended%>" Value="2"></asp:ListItem>
                        <asp:ListItem Text="<%$Resources:Content,GN0000347%>" Value="3"></asp:ListItem>
                        <%--<asp:ListItem Text="<%$Resources:Content,GN0000347%>" Value="3"></asp:ListItem>--%>
                        <%--<asp:ListItem Text="<%$Resources:Content,GN0000348%>" Value="4"></asp:ListItem>--%>
                    </asp:DropDownList>
                </div>
            </div>
        </div>
        <div class="row" id="div_renewal" runat="server">
            <div class="col-sm-3 col-xs-12 row-label">
                *
                        <asp:Literal ID="Ltrl_RenewalSettings" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000943%>" />:
            </div>
            <div class="col-sm-9 col-xs-12">
                <div class="form-group">
                    <asp:CheckBox ID="CB_Auto" runat="server" Text="Auto" onChange="UpdateManageAutoRenewal(event)" />
                    &nbsp;
                    
                    <asp:LinkButton ID="Btn_ManageAutoRenewal" runat="server" Text="<%$ Resources:Content,strManageRenewalSettings %>"></asp:LinkButton>

                    <script type="text/javascript" lang="javascript">
                        function UpdateManageAutoRenewal(e) {
                            if (e.target.checked)
                                $('#<%=Btn_ManageAutoRenewal.ClientID %>').removeClass('hide');
                            else
                                $('#<%=Btn_ManageAutoRenewal.ClientID %>').addClass('hide');
                        }
                    </script>
                    <div class="clearfix"></div>
                    <asp:Label ID="Lbl_RenewalInstructions" runat="server" Visible="false"></asp:Label>
                    &nbsp;
                    <asp:LinkButton ID="Lbtn_ClearRenewalInstructions" runat="server" Text="<%$Resources:Content,GN0000278 %>" Visible="false"></asp:LinkButton>
                </div>
            </div>

            <asp:Button ID="Btn_Dummy" runat="server" CausesValidation="false" CssClass="btn-dummy mp-hide" />
            <asp:Panel ID="Pnl_RenewalSettings" runat="server" CssClass="width-modal-popup-auto" Style="display: none">
                <div class="row">
                    <div class="col-xs-12">
                        <div id="div_updatemsg" runat="server" visible="false">
                        </div>
                    </div>
                </div>
                <div class="card">
                    <div class="header container-fluid">
                        <h3 class="pull-left">
                            <asp:Literal ID="Ltrl_RenewalSetting" runat="server" Text="<%$ Resources:Content,strManageRenewalSettings %>"></asp:Literal></h3>
                        <span>
                            <button type="button" class="close" onclick="$find('<%=MPE_RenewalSettings.ClientID%>').hide();">&times;</button>
                        </span>
                    </div>
                    <div class="body">
                        <div class="row">
                            <script type="text/javascript" lang="javascript">
                                function UpdateRenewalBillingOpts() {
                                    $get('<%=Btn_UpdateRenewalBillingOpts.ClientID %>').click();
                                }
                            </script>
                            <div class="col-xs-12 col-md-3 row-label">
                                <asp:Literal ID="Ltrl_UpgradeTo" runat="server" Text="<% $Resources:Content,strUpgradeTo %>"></asp:Literal>
                            </div>
                            <div class="col-md-4 col-xs-12">
                                <div class="form-group">
                                    <asp:DropDownList ID="Ddl_UpgradeProds" runat="server" onChange="UpdateRenewalBillingOpts()"></asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-12 col-md-3 row-label">
                                <asp:Literal ID="Ltrl_RenewalBilling" runat="server" Text="<%$ Resources:Content,GN00001490 %>"></asp:Literal>
                            </div>
                            <div class="col-xs-12 col-md-3">
                                <ajax:UpdatePanel ID="UP_RenewalBilling" runat="server" UpdateMode="Conditional">
                                    <Triggers>
                                        <ajax:AsyncPostBackTrigger ControlID="Btn_UpdateRenewalBillingOpts" EventName="Click" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <asp:Button ID="Btn_UpdateRenewalBillingOpts" runat="server" CssClass="btn-dummy hide d-none btnAction" Text="" CausesValidation="false" />
                                        <asp:DropDownList ID="Ddl_RenewalBilling" runat="server"></asp:DropDownList>
                                    </ContentTemplate>
                                </ajax:UpdatePanel>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-12 col-md-3 row-label">
                                <asp:Literal ID="Ltrl_RenewalQty" runat="server" Text="<% $Resources:Content,String35 %>"></asp:Literal>
                            </div>
                            <div class="col-xs-12 col-md-4">
                                <div class="form-group">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_RenewalQty" runat="server"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-offset-2 col-xs-8 col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-4">
                                <asp:Button ID="Btn_UpdateRenewalSettings" runat="server" Text="<%$ Resources:Content,GN0000654%>" class="btn btn-primary waves-effect btnAction" CausesValidation="false" />
                                <asp:Button ID="Btn_CancelRenewalSettings" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect" CausesValidation="false" />

                            </div>
                        </div>
                    </div>
                </div>

            </asp:Panel>
            <EM:ModalPopupExtender runat="server" ID="MPE_RenewalSettings" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="Pnl_RenewalSettings" TargetControlID="Btn_Dummy" CancelControlID="Btn_CancelRenewalSettings">
            </EM:ModalPopupExtender>
        </div>



        <div class="row">
            <div class="col-xs-12 col-md-offset-3 col-md-9">
                <asp:Button ID="Btn_Update" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,GN0000281%>" ValidationGroup="subsdetail" />
                <asp:Button ID="Btn_CancelEdit" runat="server" class="btn btn-primary waves-effect" CausesValidation="false" Text="<%$ Resources:Content,GN0000572%>" />
                <asp:ValidationSummary ID="VS_SubsDetail" runat="server" ValidationGroup="subsdetail" ShowMessageBox="true" ShowSummary="false" />
            </div>
        </div>

    </div>
</div>



<script lang="javascript">
    AllowArrowKeysInFilteredTextBoxExtender('<%=FTE_SubQty.ClientID%>');
</script>
