<%@ Page language="c#" Codebehind="ResourcesEditor.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Incidents.ResourcesEditor" %>
<%@ register TagPrefix="lst" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\Modules\BlockHeader.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
	<head id="pT_headTag">
		<title>
			<%=LocRM.GetString("tIssueTitle") %>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name=vs_defaultClientScript content="JavaScript">
		<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
		<script src="../Scripts/buttons.js"></script>		
		<script src="../Scripts/browser.js"></script>
		<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
		<script><!--
		if ((browseris.mac) && !browseris.ie5up)
		{
			var macstyle = "../layouts/styles/mac.css";
			document.write("<link rel='stylesheet' Type='text/css' href='" + macstyle + "'>");
		}
	
		//--></script>
		<script language="JavaScript"> 
			function disableEnterKey() 
			{ 
				try {
					if (window.event.keyCode == 13 && window.event.srcElement.type != "textarea")
						window.event.keyCode = 0;
				}
				catch (e) {}
			}
		</script>
	</head>
	<body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
		<form id="frmMain" runat="server">
			<ibn:blockheader id="secHeader" title="ToolBar" runat="server"></ibn:blockheader>
			<table class="ibn-propertysheet" style="HEIGHT: 100%" height="100%" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr height="22">
					<td class="boldtext" width="290" height="22"><%=LocRM.GetString("Available") %> :</td>
					<td width="4">&nbsp;</td>
					<td class="ibn-navframe boldtext"><%=LocRM.GetString("Selected") %> :</td>
				</tr>
				<tr style="HEIGHT: 100%">
					<td vAlign="top" width="290">
						<!-- Groups & Users -->
						<table class="text" style="MARGIN-TOP: 5px" cellSpacing="0" cellPadding="3" width="100%">
							<tr>
								<td width="9%"><%=LocRM.GetString("Group") %>
									:</td>
								<td width="91%"><lst:indenteddropdownlist id="ddGroups" runat="server" CssClass="text" Width="190px" AutoPostBack="True" DataTextField="GroupName" DataValueField="GroupId"></lst:indenteddropdownlist></td>
							</tr>
							<TR>
								<TD width="9%"><%=LocRM.GetString("Search") %>:</TD>
								<TD width="91%">
									<asp:TextBox id="tbSearch" runat="server" CssClass="text" Width="125px"></asp:TextBox>
									<asp:button id="btnSearch" runat="server" Width="60px" CssClass="text" CausesValidation="False"></asp:button>
									<asp:Label ID="lblError" CssClass="ibn-error" Runat=server></asp:Label>
								</TD>
							</TR>
							<tr>
								<td vAlign="top" height="96"><%=LocRM.GetString("User") %>
									:</td>
								<td vAlign="top"><asp:listbox id="lbUsers" runat="server" CssClass="text" Width="190px" SelectionMode="Multiple" Rows="6"></asp:listbox></td>
							</tr>
							<TR>
								<TD vAlign="top"></TD>
								<TD vAlign="top">
									<asp:CheckBox id="cbCanManage" runat="server"></asp:CheckBox>
								</TD>
							</TR>	
							<TR>
								<TD vAlign="top"></TD>
								<TD vAlign="top">
									<asp:CheckBox id="cbConfirmed" runat="server"></asp:CheckBox>
								</TD>
							</TR>
							<tr>
								<td vAlign="top" height="28">&nbsp;</td>
								<td>
									<Button id="btnSave" runat="server" style="DISPLAY:none"></Button>
									<button id="btnAdd" runat="server" Class="text" style="width:160px"></button>
								</td>
							</tr>
						</table>
						<!-- End Groups & Users -->
					</td>
					<td width="4">&nbsp;</td>
					<td vAlign="top" class="ibn-navframe" height="100%">
						<!-- Data GRID -->
						<div style="OVERFLOW-Y:auto;HEIGHT:300px">
							<asp:DataGrid Runat="server" ID="dgMembers" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="False" cellpadding="1" gridlines="None" CellSpacing="1" borderwidth="0px" Width="100%">
								<ItemStyle CssClass="ibn-propertysheet"></ItemStyle>
								<HeaderStyle CssClass="text"></HeaderStyle>
								<Columns>
									<asp:BoundColumn DataField="PrincipalId" Visible="False"></asp:BoundColumn>
									<asp:TemplateColumn HeaderText='Name' ItemStyle-Width="150" HeaderStyle-Width="150">
										<ItemTemplate>
											<%# GetLink( (int)DataBinder.Eval(Container.DataItem, "PrincipalId"),(bool)DataBinder.Eval(Container.DataItem, "IsGroup") )%>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText='Can Manage' ItemStyle-HorizontalAlign=Center ItemStyle-Width="60" HeaderStyle-Width="60">
										<ItemTemplate>
											<input type="checkbox" checked='<%# (bool)DataBinder.Eval(Container.DataItem, "CanManage") %>' class="text" runat="server" id="icCanManage" NAME="icCanManage"/>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" >
										<ItemTemplate>
											<%# GetStatus
											(
											DataBinder.Eval(Container.DataItem, "MustBeConfirmed"),
											DataBinder.Eval(Container.DataItem, "ResponsePending"),
											DataBinder.Eval(Container.DataItem, "IsConfirmed")
											)%>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:templatecolumn Visible="True" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px" HeaderStyle-Width="20px">
										<itemtemplate>
											<asp:imagebutton id="ibDelete" runat="server" borderwidth="0" width="16" height="16" imageurl="../layouts/images/DELETE.GIF" commandname="Delete" causesvalidation="False"></asp:imagebutton>
										</itemtemplate>
									</asp:templatecolumn>
								</Columns>
							</asp:DataGrid>
							<!-- End Data GRID --></div>
					</td>
				</tr>
			</table>
			<script language=javascript>
				function FuncSave()
				{
					DisableButtons(document.forms[0].<%=btnSave.ClientID%>);
					<%=Page.GetPostBackClientEvent(btnSave,"") %>;
				}
				function FuncCancel(IncidentId)
				{
					var obj = window.parent.document.getElementById('<%=BtnID%>');
					if(obj!=null)
						obj.style.display = "none";
					else if(parent == window)
						window.close();
					else
						window.top.frames['right'].location.href='IncidentView.aspx?IncidentId='+IncidentId;
				}
			</script>
		</form>
	</body>
</html>
