<%@ Master masterPageFile="~/WebAdminNoButtonRow.master" className="WebAdminWithConfirmationNoButtonRowMasterPage" %>
<%@ MasterType virtualPath="~/WebAdminNoButtonRow.master" %>

<script runat="server" language="cs">

private string _directionality;

public string Directionality {
    get {
        if (String.IsNullOrEmpty(_directionality)) {
            _directionality = ((string) GetGlobalResourceObject("GlobalResources", "HtmlDirectionality")).ToLower();
        }
        return _directionality;
    }
}

public string DirectionalityLeft {
    get {
        if (Directionality == "rtl") {
            return "right";
        } else {
            return "left";
        }
    }
}

public string DirectionalityRight {
    get {
        if (Directionality == "rtl") {
            return "left";
        } else {
            return "right";
        }
    }
}

// This can be called by the controls in content (e.g. via event handler)
public void SetDisplayUI(bool showConfirmation) {
    if (showConfirmation) {
        Master.SetNavigationBarVisibility(false);
        titleBar.Visible = false;
        content.Visible = false;
        confirmation.Visible = true;
    }
    else {
        Master.SetNavigationBarVisibility(true);
        titleBar.Visible = true;
        content.Visible = true;
        confirmation.Visible = false;
    }
}

</script>

<asp:content runat="server" contentplaceholderid="titleBar">
    <asp:contentPlaceHolder runat="server" id="titleBar"/>
</asp:content>

<asp:content runat="server" contentplaceholderid="content">
    <asp:contentPlaceHolder runat="server" id="content"/>

    <%-- Default confirmation dialog --%>
    <asp:contentPlaceHolder runat="server" id="confirmation" Visible="false">
        <table height="100%" width="100%">
            <tr height="70%">
                <td width="60%">
                    <table cellspacing="0" height="100%" width="100%" cellpadding="4" rules="none"
                           bordercolor="#CCDDEF" border="1" style="border-color:#CCDDEF;border-style:None;border-collapse:collapse;">
                        <tr class="callOutStyle">
                            <td style="padding-left:10;padding-right:10;" colspan="3">
                                <asp:contentPlaceHolder runat="server" id="dialogTitle"/>
                            </td>
                        </tr>
                        <tr class="bodyText" height="100%" valign="top">
                            <td style="padding-left:10;padding-right:10;" colspan="3">
                                <asp:contentPlaceHolder runat="server" id="dialogContent"/>
                            </td>
                        </tr>
                        <tr class="userDetailsWithFontSize" valign="top" height="5%">
                            <td style="padding-left:10;padding-right:10;" align="<% =DirectionalityLeft %>"><asp:contentPlaceHolder runat="server" id="dialogBottomLeftLink"/></td>
                            <td style="padding-left:10;padding-right:10;" align="<% =DirectionalityRight %>"><asp:contentPlaceHolder runat="server" id="dialogBottomLeftButton"/></td>
                            <td style="padding-left:10;padding-right:10;" align="<% =DirectionalityRight %>" width="1%"><asp:contentPlaceHolder runat="server" id="dialogBottomRightButton"/></td>
                        </tr>
                    </table>
                </td>
                <td/>
            </tr>
            <tr><td colspan="2"/></tr>
        </table>
    </asp:contentPlaceHolder>
</asp:content>
