<%@ Page Language="c#" CodeBehind="Create.aspx.cs" AutoEventWireup="True" Inherits="eDocument.Server.Administrator.Subscription.Create" MasterPageFile="~/Site.Master" %>

<%@ Register Src="../CultureChooser.ascx" TagName="CultureChooser" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h1 class="skjema-admin__page-title">
        Opprett abonnement
    </h1>

    <p class="mb-5">
        Fra denne siden kan du opprette et abonnnement. De obligatoriske feltene er 
				merket med *.
    </p>

    <div class="mb-4">
        <asp:Label 
            CssClass="skjema-admin__page__label"
            ID="Label4" 
            runat="server">
            Organisasjon *
        </asp:Label>

        <asp:DropDownList 
            ID="ddlConsumer" 
            CssClass="skjema-admin__page__text"
            runat="server"  
            DataTextField="Name" 
            DataValueField="ConsumerID">
        </asp:DropDownList>

        <asp:HyperLink 
            ID="Hyperlink2" 
            runat="server" 
            Target="_blank" 
            Visible="False">
            Help
        </asp:HyperLink>

        <asp:RequiredFieldValidator 
            ID="RequiredFieldValidator1" 
            runat="server" 
            ErrorMessage="Du mċ velge en organisasjon."
            ControlToValidate="ddlConsumer" 
            InitialValue="---"
            ForeColor="Red"
            Display="Dynamic">
        </asp:RequiredFieldValidator>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label2" 
            CssClass="skjema-admin__page__label"
            runat="server">
            Skjema *
        </asp:Label>

        <asp:DropDownList 
            ID="ddlEDocumentTemplate" 
            CssClass="skjema-admin__page__text"
            runat="server" 
            DataTextField="ShortNameWithName"
            DataValueField="eDocumentTemplateID">
        </asp:DropDownList>

        <asp:HyperLink 
            ID="Hyperlink1" 
            runat="server" 
            Target="_blank" 
            Visible="False">
            Help
        </asp:HyperLink>

        <asp:RequiredFieldValidator 
            ID="Requiredfieldvalidator3" 
            runat="server" 
            ErrorMessage="Du mċ velge et skjema."
            ControlToValidate="ddlEDocumentTemplate" 
            InitialValue="---" 
            ForeColor="Red"
            Display="Dynamic">
        </asp:RequiredFieldValidator>
    </div>
     <div class="mb-4">
         <asp:Label id="Label8" runat="server">Aktiv</asp:Label>
         <asp:CheckBox id="checkActive" runat="server" Checked="True"></asp:CheckBox>
         Angir om skjemaet er tilgjengelig for publikum.
     </div>
    <div class="mb-4">
        <asp:Label 
            CssClass="skjema-admin__page__label"
            ID="Label12" 
            runat="server">
            XSL
        </asp:Label>

        <asp:DropDownList 
            ID="ddlXsl" 
            runat="server" 
            CssClass="skjema-admin__page__text"
            DataTextField="Name"
            DataValueField="ID">
        </asp:DropDownList>
    </div>

    <div class="mb-4">
        <label class="skjema-admin__page__label">
            Sikkerhetsnivċ
        </label>

        <asp:DropDownList 
            runat="server"
            CssClass="skjema-admin__page__text"
            ID="ddlSecurityLevel">
            <asp:ListItem Selected="True" Value="---">---</asp:ListItem>
            <asp:ListItem Value="1"></asp:ListItem>
            <asp:ListItem Value="2"></asp:ListItem>
            <asp:ListItem Value="3"></asp:ListItem>
            <asp:ListItem Value="4"></asp:ListItem>
        </asp:DropDownList>
    </div>

    <div class="mb-4">
        
        <asp:Label 
            ID="lblDokumentbankenBlankett" 
            class="skjema-admin__page__label"
            runat="server">
            XFT
        </asp:Label>

        <asp:DropDownList 
            ID="ddlDokumentbankenBlankett" 
            runat="server" 
            CssClass="skjema-admin__page__text"
            DataTextField="Name"
            DataValueField="DokumentbankenBlankettID">
        </asp:DropDownList>

        <asp:HyperLink ID="HyperLink7" runat="server" Target="_blank" Visible="False">Help</asp:HyperLink>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label5" 
            class="skjema-admin__page__label"
            runat="server">
            Prosessmodus
        </asp:Label>

        <asp:DropDownList 
            ID="ddlProcessMode"
            CssClass="skjema-admin__page__text"
            runat="server">
            <asp:ListItem Value="0" Selected="True">Isteden for</asp:ListItem>
            <asp:ListItem Value="1">F&#248;r</asp:ListItem>
            <asp:ListItem Value="2">Etter</asp:ListItem>
        </asp:DropDownList>

        <asp:HyperLink ID="Hyperlink3" runat="server" Target="_blank" Visible="False">Help</asp:HyperLink>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label3" 
            class="skjema-admin__page__label"
            runat="server">
            Kommentar
        </asp:Label>

        <asp:TextBox 
            ID="txtComment" 
            CssClass="skjema-admin__page__text"
            runat="server" 
            TextMode="MultiLine" 
            Height="70px">
        </asp:TextBox>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label13" 
            class="skjema-admin__page__label"
            runat="server">
            Egenskaper
        </asp:Label>

        <asp:TextBox 
            ID="txtPropertyBag" 
            runat="server" 
            CssClass="skjema-admin__page__text"
            TextMode="MultiLine" 
            Height="50px">
        </asp:TextBox>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label29" 
            class="skjema-admin__page__label"
            runat="server">
            Sprċk
        </asp:Label>

		<uc1:CultureChooser 
            ID="CultureChooser1" 
            runat="server" />
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label1" 
            class="skjema-admin__page__label"
            runat="server">
            Fra dato
        </asp:Label>

        <asp:TextBox 
            ID="txtFromDate" 
            CssClass="skjema-admin__page__text"
            runat="server">
        </asp:TextBox>

        <asp:CompareValidator 
            ID="CompareValidator1" 
            runat="server" 
            ControlToValidate="txtFromDate"
            ErrorMessage="Feil datoformat, riktig format er dd.mm.ċċċċ" 
            Operator="DataTypeCheck" 
            ForeColor="Red"
            Display="Dynamic"
            Type="Date">
        </asp:CompareValidator>
    </div>

    <div class="mb-4">
        <asp:Label 
            ID="Label11" 
            class="skjema-admin__page__label"
            runat="server">
            Til dato
        </asp:Label>

        <asp:TextBox 
            ID="txtToDate" 
            CssClass="skjema-admin__page__text"
            runat="server">
        </asp:TextBox>

        <asp:CompareValidator 
            ID="CompareValidator2" 
            runat="server" 
            Display="Dynamic"
            ForeColor="Red"
            ControlToValidate="txtToDate"
            ErrorMessage="Feil datoformat, riktig format er dd.mm.ċċċċ" 
            Operator="DataTypeCheck" 
            Type="Date">
        </asp:CompareValidator>

    </div>

    <div class="mb-4">
        <asp:Button 
            CssClass="skjema-admin__button skjema-admin__button--primary"
            ID="btnCreate" 
            runat="server" 
            Text="Opprett" 
            OnClick="btnCreate_Click">
        </asp:Button>
    </div>

    <div class="mb-5">
        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
    </div>
</asp:Content>