<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="EditPrivacy.aspx.cs" Inherits="eDocument.Server.Administrator.Resources.EditPrivacy" MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">

    <a class="skjema-admin__page__back skjema-admin__mb-20" href="List.aspx">
        <div class="d-flex align-items-center">
            <div class="skjema-admin__page__back-circle mr-3"></div>
            Systemadministrasjon / Systemtekster og oversettelse
        </div>
    </a>

    <h1 class="skjema-admin__page-title mt-0 skjema-admin__mb-20">
        <asp:label id="lblHeader" runat="server"></asp:label>
    </h1>

    <p class="skjema-admin__mb-40">
        Tilpass personvernerklæringen.
    </p>
    
    <asp:label id="lblMessage" runat="server" ForeColor="Red"></asp:label>
    
    
    <asp:panel class="skjema-admin__mb-40" runat="server">
        <!--<label class="skjema-admin__mr-30">
            <input type="radio" name="group" />
            Innebygget
        </label>

        <label>
            <input type="radio" name="group" />
            Bruk ekstern lenke
        </label>-->
        <asp:RadioButtonList ID="rblChangeLinkType"
                             runat="server"
                             AutoPostBack="True"
                             CssClass="skjema-admin__table__radio-button-list"
                             OnSelectedIndexChanged="rblChangeLinkType_OnSelectedIndexChanged"
                             RepeatDirection="Horizontal">
            <asp:ListItem Value="BuiltIn">Innebygget</asp:ListItem>
            <asp:ListItem Value="External">Bruk ekstern lenke</asp:ListItem>
        </asp:RadioButtonList>
    </asp:panel>

    <div class="skjema-admin__tabs" id="divCultures" runat="server">
        <asp:RadioButtonList ID="rblCultures"
                             runat="server"
                             CssClass="skjema-admin__table__radio-button-list"
                             AutoPostBack="True"
                             OnSelectedIndexChanged="rblCultures_OnSelectedIndexChanged"
                             RepeatDirection="Horizontal">
        </asp:RadioButtonList>
        
        <%--<button class="skjema-admin__tabs__tab skjema-admin__tabs__tab--active skjema-admin__mr-40" type="button" data-jscomponent="tabToggle" data-tab-id="1">
            Standard (bokmål)
        </button>

        <button class="skjema-admin__tabs__tab skjema-admin__mr-40" type="button" data-jscomponent="tabToggle" data-tab-id="2">
            Nynorsk
        </button>

        <button class="skjema-admin__tabs__tab skjema-admin__mr-40" type="button" data-jscomponent="tabToggle" data-tab-id="3">
            Engelsk
        </button>

        <button class="skjema-admin__tabs__tab" type="button" data-jscomponent="tabToggle" data-tab-id="4">
            Samisk
        </button>--%>
    </div>

    <div class="skjema-admin__mb-40">
        <div data-jscomponent="tabPanel" data-tab-id="1">
            
            <asp:Panel ID="pnlExternalUrl" class="skjema-admin__editor__panel" runat="server">
                <div class="skjema-admin__mb-20">
                    <label class="skjema-admin__editor__label" for="txtExternalUrl">
                        Url
                    </label>
                    <asp:TextBox id="txtExternalUrl" class="skjema-admin__editor__input" type="text" runat="server" />
                </div>
            </asp:Panel>

            <asp:Panel ID="pnlEditor" class="skjema-admin__editor__panel" runat="server">
                <div class="skjema-admin__mb-20">
                    <label class="skjema-admin__editor__label" for="title">
                        Tittel
                    </label>
                    <asp:TextBox id="txtTitle" class="skjema-admin__editor__input" type="text" runat="server"/>
                </div>

                <div class="skjema-admin__mb-20">
                    <label class="skjema-admin__editor__label" for="ingress">
                        Ingress
                    </label>
                    <asp:TextBox id="txtIngress" class="skjema-admin__editor__input" TextMode="MultiLine" Rows="6" runat="server"></asp:TextBox>
                </div>

                <div>
                    <label class="skjema-admin__editor__label" for="body">
                        Hovedinnhold
                    </label>
                    <asp:TextBox id="txtBody" data-js="tinyMCE" TextMode="MultiLine" Rows="6" runat="server"></asp:TextBox>
                </div>
            </asp:Panel>
        </div>
        <div class="d-none" data-jscomponent="tabPanel" data-tab-id="2">
            2
        </div>
        <div class="d-none" data-jscomponent="tabPanel" data-tab-id="3">
            3
        </div>
        <div class="d-none" data-jscomponent="tabPanel" data-tab-id="4">
            4
        </div>
    </div>

    <div class="d-flex justify-content-end">
        <asp:Button ID="btnSave" OnClick="btnSave_OnClick" Text="Lagre endringer" class="skjema-admin__button skjema-admin__button--primary skjema-admin__button--primary-shadow mb-5" runat="server"></asp:Button>
    </div>
    
    <asp:Panel ID="pnlConfirmSave" Visible="False" runat="server" CssClass="skjema-admin__modal" data-jscomponent="modal">
        <div class="skjema-admin__modal__window">

            <button class="skjema-admin__modal__close" type="button" data-jscomponent="modalClose"></button>

            <asp:Label CssClass="skjema-admin__page__label" Text="Endringene er lagret" runat="server" />

<%--            <div>
                <asp:Button CssClass="skjema-admin__button skjema-admin__button--primary" runat="server" ID="btnOk" OnClick="btnOk_OnClick" Text="OK" />
            </div>--%>
        </div>
    </asp:Panel>

    <script>
        document.addEventListener("DOMContentLoaded", function () {
            SkjemaAdmin.tinyMCEObj.init({
                selector: "[data-js='tinyMCE']",
                plugins: ['paste', 'link', 'lists', 'code', 'paste', 'fullscreen', 'autoresize'],
                toolbar: 'link | bold italic | numlist bullist | formatselect | paste | code | fullscreen',
                menubar: false,
                statusbar: false,
                min_height: 800
            });
        });
    </script>
</asp:Content>