<%@ Page MaintainScrollPositionOnPostback="true" Language="C#" AutoEventWireup="true" CodeBehind="Create4.aspx.cs" Inherits="eDocument.Server.Administrator.eDocumentTemplate.Create4" MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1 class="skjema-admin__page-title">Opprett skjema, trinn 4/5</h1>
    <h3>Kvittering til utfyller</h3>
    <br/>
    <div runat="server" id="divMailReceipt">
        
        <b>Ønsker du at skjema.no sender en kvittering til utfyller? </b>
        <br/>
        <br/>
        <asp:RadioButtonList id="rblSendReceipt" runat="server" AutoPostBack="True" CausesValidation="False" OnSelectedIndexChanged="rblSendReceipt_OnSelectedIndexChanged">
            <asp:ListItem Value="no">Nei, det skal ikke sendes kvittering</asp:ListItem>
            <asp:ListItem Value="yes">Ja, det skal sendes kvittering</asp:ListItem>
        </asp:RadioButtonList>
        
        <div id="divYesSend" runat="server" Visible="False">
            <br/>
            <div runat="server" id="divNoMailBoxFields" Visible="False">
                Det finnes ingen e-postfelt i skjemaet.
            </div>

            <div runat="server" id="divReceivers" Visible="False">
                <b>Det er felt i skjemaet markert som kvitteringsmottak. Skal kvittering sendes til dette feltet? </b><br/>
                <br/>
                <asp:RadioButtonList runat="server" id="rblSelectRecipient" AutoPostBack="True" CausesValidation="False" OnSelectedIndexChanged="rblSelectRecipient_OnSelectedIndexChanged">
                    <asp:ListItem Value="yes"></asp:ListItem>
                    <asp:ListItem Value="no">Nei, bruk andre felt i skjemaet - spesifiser..</asp:ListItem>
                </asp:RadioButtonList>
            </div>

            <div runat="server" id="divSelectMailField" Visible="False">
                <br/>
                <b>Velg mottaker blant disse feltene</b><br/>
                <br/>
                <asp:DropDownList runat="server" DataValueField="Name" DataTextField="Caption" id="ddlMailBoxes" CausesValidation="False" AutoPostBack="True" OnSelectedIndexChanged="ddlMailBoxes_OnSelectedIndexChanged"/>
            </div>
            
            <div id="divContent" runat="server" Visible="False">
<%--                <br/>
                <b>Hvem skal stå som avsender av mailen?</b>
                <asp:RadioButtonList runat="server" id="rblFrom" CausesValidation="False" AutoPostBack="True" OnSelectedIndexChanged="rblFrom_OnSelectedIndexChanged">
                    <asp:ListItem Value="org">XXX</asp:ListItem>
                    <asp:ListItem Value="other">Annen - spesifiser..</asp:ListItem>
                </asp:RadioButtonList>
                
                <div runat="server" id="divFromAddress" Visible="False">
                    <br/>
                </div>
            </div>
            
            <div id="divSubject" runat="server" Visible="False">--%>
                <br/>
                <b>Avsender, emne og innhold</b><br/>
                Nedenfor er forslag til avsender, emne og meldingstekst. Rediger gjerne på disse. 
                <br/>
                
                <div class="skjema-admin__page__field">
                    <br/>
                    <label class="skjema-admin__page__label">
                        Avsender *
                    </label>
                    <asp:TextBox 
                        ID="txtFrom"
                        CssClass="skjema-admin__page__text"
                        runat="server">
                    </asp:TextBox>
                    <asp:RequiredFieldValidator 
                        ControlToValidate="txtFrom" 
                        ForeColor="Red" 
                        ID="RequiredFieldValidator1" 
                        runat="server" 
                        Display="Dynamic"
                        ErrorMessage="*">
                    </asp:RequiredFieldValidator>
                </div>

                <div class="skjema-admin__page__field">
                    <label class="skjema-admin__page__label">
                        Emne *
                    </label>
                    <asp:TextBox 
                        ID="txtSubject"
                        CssClass="skjema-admin__page__text"
                        runat="server">
                    </asp:TextBox>
                    <asp:RequiredFieldValidator 
                        ControlToValidate="txtSubject" 
                        ForeColor="Red" 
                        ID="RequiredFieldValidator3" 
                        runat="server" 
                        Display="Dynamic"
                        ErrorMessage="*">
                    </asp:RequiredFieldValidator>
                </div>

                <div class="skjema-admin__page__field">
                    <label class="skjema-admin__page__label">
                        Meldingstekst *
                    </label>
                    <asp:TextBox 
                        TextMode="MultiLine" 
                        CssClass="skjema-admin__page__text"
                        ID="txtBody" 
                        runat="server" 
                        Height="200px">
                    </asp:TextBox>
                    <asp:RequiredFieldValidator 
                        ControlToValidate="txtBody" 
                        ForeColor="Red" 
                        ID="RequiredFieldValidator4" 
                        Display="Dynamic"
                        runat="server" 
                        ErrorMessage="*">
                    </asp:RequiredFieldValidator>
                </div>
            </div>
        </div>
    </div>

    <br/>
    <div id="buttons">
        <div class="mb-5">
            <asp:Button 
                ID="btnPrevious" 
                CssClass="skjema-admin__button skjema-admin__button--secondary d-inline-block text-center"
                runat="server" 
                Text="Forrige" 
                OnClick="MovePrevious">
            </asp:Button>
            <asp:Button 
                ID="btnNext" 
                CssClass="skjema-admin__button skjema-admin__button--primary mt-3 mb-5"
                runat="server" 
                Text="Neste" 
                OnClick="MoveNext">
            </asp:Button>
        </div>

        <asp:Label 
            ID="lblMessage" 
            CssClass="skjema-admin__page__label mb-5"  
            runat="server" 
            ForeColor="Red">
        </asp:Label>
    </div>
    

</asp:Content>