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

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

    <div class="skjema-admin__page__field">
        <asp:Label runat="server" id="lblUsername"></asp:Label>
    </div>

    <asp:Panel runat="server" ID="panelSelf">
        <div class="skjema-admin__page__field">
            <label class="skjema-admin__page__label">
                E-mail
            </label>

            <asp:textbox 
                id="txtEmail" 
                CssClass="skjema-admin__page__text"
                runat="server">
            </asp:textbox>

            <asp:RequiredFieldValidator 
                runat="server" 
                ControlToValidate="txtEmail" 
                ForeColor="Red" 
                Display="Dynamic">*</asp:RequiredFieldValidator>
            
            <asp:RegularExpressionValidator 
                runat="server" 
                ControlToValidate="txtEmail" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                Display="Dynamic" 
                ErrorMessage="Ugyldig e-postadresse" 
                ForeColor="Red">
            </asp:RegularExpressionValidator>

            <asp:Label runat="server" id="lblEmail" ForeColor="Red"/>
        </div>

        <div class="skjema-admin__page__field">
            <label class="skjema-admin__page__label">
                 Display-name
            </label>

                <asp:textbox 
                    id="txtDisplayName" 
                    runat="server" 
                    CssClass="skjema-admin__page__text"
                    MaxLength="300">
                </asp:textbox>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtDisplayName" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>   
        </div>
    </asp:Panel>

    <div class="skjema-admin__page__field">
        <label class="skjema-admin__page__label">
            Roller
        </label>

        <div class="skjema-admin__page__tick">
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkSuper" Text="Super-bruker - kan invitere nye brukere og endre andres rettigheter."/><br/>
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkDesigner" Text="Skjema-redaktør - kan publisere skjema."/><br/>
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkFeltverdier" Text="Feltverdier - kan registrere feltverdier i publiserte skjema."/><br/>
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkIntegration" Text="Integrasjon og drift - kan konfigurere forsendelser og se feilede forsendelser."/><br/>
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkCase" Text="Saksbehandler - har tilgang på saksbehandlingsverktøyet."/><br/>
            <asp:CheckBox CssClass="skjema-admin__page__tick" runat="server" id="chkVault" Text="Skjemadata - kan laste ned skjemadata for innsendte skjema."/><br/>
        </div>
    </div>
        
    <asp:button 
        id="btnSave" 
        runat="server" 
        CssClass="skjema-admin__button skjema-admin__button--primary"
        Text="Lagre" 
        onclick="btnSave_Click"></asp:button>
    <br/>

    <asp:Label runat="server" id="lblMessage" ForeColor="Red"></asp:Label>
    <asp:HyperLink runat="server" id="lnkLicenseCase" Visible="False" NavigateUrl="~/Consumer/RequestNewLicense.aspx?focus=quota-caseusers">Klikk her for å be om endringer i lisensen.</asp:HyperLink>
    <asp:HyperLink runat="server" id="lnkLicenseForms" Visible="False" NavigateUrl="~/Consumer/RequestNewLicense.aspx?focus=quota-formusers">Klikk her for å be om endringer i lisensen.</asp:HyperLink>
</asp:Content>