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

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
			<h1>Legg til prosess</h1>
			<p>
				Fra denne siden kan du velge hvilke prosesser som skal kjøre for regelen. Sett et kryss i avkrysningsboksen for den/de prosessen(e) du ønsker å legge til og klikk "Utfør"-knappen.
			</p>
			<br/>
			<table>
				<tr>
					<td>
						Mottakende rolle 
					</td>
					<td>
						<asp:DropDownList runat="server" ID="ddlTargetEndpoint"/>
					</td>
					<td>
						Velg den rollen søknadsdata skal gå til for å få ønskede data med når PDF og XML genereres.
					</td>
				</tr>
			</table>
            <asp:RequiredFieldValidator
                ID="RequiredFieldValidator1"
                runat="server"
                ForeColor="Red"
                Display="Dynamic"
                ControlToValidate="ddlTargetEndpoint"
                ErrorMessage="Mottakende rolle må fylles ut.">
            </asp:RequiredFieldValidator>
			<br/>
			<asp:datagrid id="dgProcesses" runat="server" AutoGenerateColumns="False" Width="100%" HeaderStyle-CssClass="HeaderStyle"
				ItemStyle-CssClass="ItemStyle" AlternatingItemStyle-CssClass="AlternatingItemStyle" AllowSorting="False">
				<AlternatingItemStyle CssClass="AlternatingItemStyle"></AlternatingItemStyle>
				<ItemStyle CssClass="ItemStyle"></ItemStyle>
				<HeaderStyle CssClass="HeaderStyle"></HeaderStyle>
				<Columns>
					<asp:BoundColumn Visible="False" DataField="Id"></asp:BoundColumn>
					<asp:TemplateColumn>
						<HeaderTemplate>
							Velg
						</HeaderTemplate>
						<ItemTemplate>
							<asp:CheckBox runat="server" ID="cbSelect" />
						</ItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="Name" SortExpression="Name ASC" HeaderText="Navn"></asp:BoundColumn>
					<asp:BoundColumn DataField="Comment" HeaderText="Kommentar"></asp:BoundColumn>
					<asp:BoundColumn DataField="CreatedOn" SortExpression="CreatedOn ASC" HeaderText="Opprettet"></asp:BoundColumn>
				</Columns>
			</asp:datagrid>
			<P>
				<asp:Label id="lblNoProcessesMessage" runat="server">Ingen tilgjengelige prosesser. <a href="../Process/Create.aspx">Klikk her for å opprette en ny prosess.</a></asp:Label></P>
			<P>
			<asp:Button id="btnCancel" runat="server" Text="Avbryt" onclick="btnCancel_Click" CssClass="skjema-admin__button" CausesValidation="False"></asp:Button>&nbsp;
			<asp:Button id="btnAttach" runat="server" Text="Utfør" onclick="btnAttach_Click" CssClass="skjema-admin__button skjema-admin__button--primary"></asp:Button>
			<asp:label id="lblMessage" runat="server" ForeColor="Red"></asp:label></P>
</asp:Content>