<%@ Page Language="C#" MasterPageFile="~/masterpages/eDashboard.master" AutoEventWireup="true" CodeBehind="RQ4ReceiptTemplates.aspx.cs" 
    Inherits="WebSite.site.HITS.Organization.RQ4ReceiptTemplates"  Title="Brightstar Device Protection: RQ4 Receipt Templates" Culture="auto" UICulture="auto" Theme="eMain"%>

<%@ Register Src="~/Controls/Organization/ReceiptTemplateList.ascx" TagPrefix="uc" TagName="ReceiptTemplateList" %>
<%@ Register Src="~/Controls/Organization/ReceiptTemplateEdit.ascx" TagPrefix="uc" TagName="ReceiptTemplateEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="eContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>        
	<h1>RQ4 Receipt Templates</h1>
    <style type="text/css">
    .errorText {
            color:red;
        }
        .highlightedTmpl {
            border-color:yellow;
            border-width:3px;
        }
    </style>
     <script language="javascript" type="text/javascript">

         function ConfirmDeleteReceiptTemplate(rowId) {
             HighlightReceiptTemplateRow(rowId, "yellow");
             if (confirm("Are you sure you want to delete highlighted Record?.")) {
                 return true;
             }
             else {
                 HighlightReceiptTemplateRow("");
                 return false;
             }
         }

         function HighlightReceiptTemplateRow(rowId, highlightColor) {
             clearHighlightReceiptTemplate();
             //as rows has inline styles, we cann't use add/RemoveClass. which is cleaner.
             if (rowId != "") {
                 hilight_css = {
                     "border-color": highlightColor,
                     "border-width": "3px"
                 };
                 $("." + rowId).css(hilight_css);
             }
         }
         function clearHighlightReceiptTemplate() {
             regular_css = {
                 "border-color": "black",
                 "border-width": "2px"
             };
             $(".receiptTemplateRow").css(regular_css);
         }
        </script>
    <div class="greyblock" style="overflow: hidden">        
        <asp:LinkButton ID="lbtnBackToCarrierDetails" runat="server" Text="<%$ Resources: OrganizationManagement, Back2CarrierDetailsLabel %>" Style="float: left;" OnClick="lbtnBackToCarrierDetails_Click"></asp:LinkButton>
    </div>
    <div style="overflow: hidden">
        <asp:Label ID="lblPageError" runat="server" Visible="false" CssClass="greyblock"></asp:Label>
    </div>
    <div class="greyblock">
        <asp:UpdatePanel ID="upReceiptTemplate" runat="server">
            <ContentTemplate>
                <asp:HiddenField ID="hdnConflictedReceiptTemplate" runat="server" />
                <uc:ReceiptTemplateList ID="ucReceiptList"  runat="server" />
                <uc:ReceiptTemplateEdit ID="ucReceiptEdit" runat="server" Visible="false" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>