<%@ Page Title="Gem note" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TL_connect_Edit._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h3>Vejledning om fanen TL Connect Editor</h3>
    <div class="panel panel-default">
        <div class="panel-body">
            <p>Akten for den valgte servitut kan læses ved at klikke på titlen nedenfor.</p>
            <p>Egne noter om servitutten kan indskrives herunder.</p>
        </div>
    </div>
    
    <div class="container">
        <div class="row">
            <div class="col-sm-10">
                <h2><a runat="server" id="lblOpenAkt2" href="https://some-url" target="_blank">Vis akt</a><asp:Label ID="lblErr" runat="server" Text="Den fremsøgte servitut kan ikke hentes" Visible="false"></asp:Label></h2>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">Gem/rediger note om servitut</h3>
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label for="txtPaataleCVR">Påtaleberettiges CVR nr</label>&nbsp&nbsp
                            <asp:RequiredFieldValidator ID="rfdPaataleCVR" runat="server" class="text-danger" ErrorMessage="Feltet skal udfyldes"
                            ControlToValidate="txtPaataleCVR"></asp:RequiredFieldValidator>
                            <asp:TextBox class="form-control" type="text" placeholder="CVR nr" ID="txtPaataleCVR" runat="server"></asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="txtPaataleTekst">Påtaleberettiget</label>&nbsp&nbsp
                            <asp:TextBox class="form-control" type="text" placeholder="Påtaleberettiget" ID="txtPaataleTekst" runat="server"></asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="txtFraSide">Fra side</label>&nbsp&nbsp
                            <asp:TextBox class="form-control" type="text" placeholder="Sidenummer i pdf-fil" ID="txtFraSide" runat="server" TextMode="Number"></asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="txtTilSide">Til side</label>&nbsp&nbsp
                            <asp:TextBox class="form-control" type="text" placeholder="Sidenummer i pdf-fil" ID="txtTilSide" runat="server" TextMode="Number"></asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="txtNoter">Noter</label>&nbsp&nbsp
                            <asp:TextBox class="form-control" type="text" placeholder="Egen note om servitut" ID="txtNoter" Rows="5" runat="server" TextMode="MultiLine"></asp:TextBox>
                        </div>
                        <div class="form-group">                            
                            <button class="btn btn-secondary btn-sm pull-left" title="Vis indhold af historik" type="button" data-toggle="collapse" data-target="#HistoryPanel" aria-expanded="false" aria-controls="collapsablePanel">Historik...</button>
                            <br>
                            <p></p>
                            <div vertical-align="top" class="collapse" ID="HistoryPanel">
                                <br>
                                <asp:Table ID="historik" runat="server" Width="500px"></asp:Table >
                            </div>
                            <br>
                       </div>

                        <div class="form-group">
                            <label for="txtaktLink">Akt</label>&nbsp&nbspBemærk rettelse i link vil medføre at den oprindelige akt ikke længere nås.
                            <asp:TextBox class="form-control" type="text" placeholder="Alternativt link til akt" ID="TextBoxAkt" runat="server"></asp:TextBox>
                        </div>

                        <div class="form-group">
                            <label for="txtUser" id="lblUser" runat="server" visible="false">Bruger</label>&nbsp&nbsp
                            <asp:RequiredFieldValidator ID="rfdPaataleUser" runat="server" class="text-danger" ErrorMessage="Feltet skal udfyldes"
                            ControlToValidate="txtUser"></asp:RequiredFieldValidator>
                            <asp:TextBox CssClass="form-control" type="text" placeholder="Bruger der har foretaget rettelse" ID="txtUser" runat="server" Visible="false"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="lblSidstRettet" runat="server" Text="Noten er sidst gemt af xx den yyy"></asp:Label>
                        </div>
                        <div class="form-group">
                            <asp:TextBox class="form-control" TextMode="MultiLine" Visible="false" type="text"  ID="lblFejl" Rows="5" runat="server" Text="test"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Button class="btn btn-default" ID="btnSave" runat="server" OnClick="BtnSave_Click" Text="Gem note" />
                            <asp:Label ID="lblSaveNotPermitted" runat="server" visible="false" Text="<b>Du har ikke rettigheder til at gemme ændringer</B>" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="hiddenCtls">
        <!-- Controls in this div are hidden; used for keeping infomation between postbacks -->
        <asp:TextBox ID="txtGid" runat="server" Visible="false"></asp:TextBox>
        <asp:TextBox ID="txtDokID" runat="server" Visible="false"></asp:TextBox>
        <asp:TextBox ID="txtAkt" runat="server" Visible="false"></asp:TextBox>
        <asp:TextBox ID="txtServitutTekst" runat="server" Visible="false"></asp:TextBox>
        <asp:TextBox ID="txtOprettet" runat="server" Visible="false"></asp:TextBox>
    </div>
</asp:Content>
