<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Admin.aspx.vb" Inherits="Admin" %>

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


    <script language="javascript" type="text/javascript">
    function Prompt(val)
        {
            return confirm('Do you really want to ' + val + ' the selected User?');
        }
    </script>

            
    
<table>
			<tr>				
				<td style="width:400px; text-align:right; height: 26px;">Users:</td>
				<td style="width:400px; text-align:left; height: 26px;"><asp:DropDownList ID="ddlUserName" runat="server" AutoPostBack="true" BackColor="LightYellow" ForeColor="Black"></asp:DropDownList>
                    &nbsp;&nbsp;
                                <asp:Button ID="btnUserStatus" runat="server" OnClientClick="return Prompt(this.value);" Text="Button" Visible="false" /></td>
				<td style="width:400px; text-align:left; height: 26px;">RoleName: <asp:DropDownList ID="ddlRoleName" runat="server" AutoPostBack="true" BackColor="LightYellow" ForeColor="Black"></asp:DropDownList></td>
			</tr>			
			<tr>
				<td colspan="2">
					<asp:Panel ID="pnlNewUser" runat="server" >
					<table>
						<tr>											
							<td style="text-align:right"><asp:RequiredFieldValidator ID="vldUserNameRequired" runat="server" Display="Dynamic"  ControlToValidate="txtUserName" ValidationGroup="save" Text="*" ErrorMessage="<br>User Name is required"></asp:RequiredFieldValidator>User Name:</td>
							<td style="text-align:left"><asp:TextBox ID="txtUserName"  runat="server" BackColor="LightYellow"></asp:TextBox>
                                &nbsp;&nbsp;&nbsp;
                            </td>						
						</tr>
						<tr>
								
							<td style="width:390px; text-align:right"><asp:RequiredFieldValidator ID="vldPasswordRequired" ValidationGroup="save" runat="server" ControlToValidate="txtPassword" Text="*" ErrorMessage="Password is required"></asp:RequiredFieldValidator>Password:</td>
							<td style="width:390px; text-align:left"><asp:TextBox ID="txtPassword" runat="server" Width="150PX" BackColor="lightyellow" TextMode="Password"></asp:TextBox></td>
						</tr>
						<tr>
										
							<td style=" width:390px; text-align:right"><asp:RequiredFieldValidator ID="vldFirstNameRequired" runat="server" ControlToValidate="txtFirstName" ValidationGroup="save" Text="*" ErrorMessage="First Name is required"></asp:RequiredFieldValidator>First Name:</td>
							<td style="width:390px; text-align:left"><asp:TextBox ID="txtFirstName"  runat="server" BackColor="LightYellow"></asp:TextBox></td>     												
						</tr>
						<tr>
								
							<td style="width:390px; text-align:right"><asp:RequiredFieldValidator ID="vldLastNameRequired" runat="server" ControlToValidate="txtLastName" ValidationGroup="save" Text="*" ErrorMessage="Last Name is required"></asp:RequiredFieldValidator>Last Name:</td>
							<td style="width:390px; text-align:left"><asp:TextBox ID="txtLastName"  runat="server" BackColor="LightYellow"></asp:TextBox></td>
						</tr>
						<tr>
								
							<td style="width:390px; text-align:right"><asp:RequiredFieldValidator ID="vldEmailRequired" Display="Dynamic" runat="server" ValidationGroup="save" Text="*" ControlToValidate="txtEmail" ErrorMessage="Email is required"></asp:RequiredFieldValidator>E-Mail:</td>
							<td style="width:390px; text-align:left"><asp:TextBox ID="txtEmail"  runat="server" BackColor="LightYellow"></asp:TextBox>@Chartercom.com</td>

						</tr>
					</table>			
					</asp:Panel>
				</td>
				<td style="width:450px; text-align:left"><asp:ValidationSummary ID="vldSummarySave" runat="server" ValidationGroup="save" DisplayMode="List" /> </td>
			</tr>
			
			<tr>
				<td style="text-align:right"></td>				
				<td style="width:400px;"> </td>
				<td style=" width:400px; text-align:left" ><asp:Label ID="lblErrorMsg" runat="server" Text="Please select one or more templates" Font-Bold="true" Visible="false" ForeColor="red"></asp:Label></td>
			</tr>
			<tr>						
				<td style="width:400px;"></td>
				<td style="width:400px; text-align:left">
					<asp:DataGrid ID="dg1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal">
							 <Columns>
									<asp:TemplateColumn>
									<ItemTemplate>
									<asp:CheckBox ID="chk" runat="server" />
									</ItemTemplate>
									</asp:TemplateColumn>	
									<asp:BoundColumn DataField="template" HeaderText="Template Name" ReadOnly="True"></asp:BoundColumn>		
									<asp:BoundColumn DataField ="TEMPLATEID" HeaderText="TemplateID" Visible="False"></asp:BoundColumn>
							</Columns>
						<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
						<SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
						<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" Mode="NumericPages" />
						<AlternatingItemStyle BackColor="#F7F7F7" />
						<ItemStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
						<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
					</asp:DataGrid> 
				</td>
				<td>
					<fieldset id="fldChangePassword" runat="server" style="width:500px" title="Change Password">
					<asp:Panel ID="pnlChangePassword" runat="server">
					<table>
						<tr>
						
							<td style="text-align:right">User Name:</td>
							<td style="text-align:left"><asp:TextBox ID="txtUser" ReadOnly="true"  runat="server" BackColor="LightYellow"></asp:TextBox></td>	
						</tr>
						<tr>
							<td style="text-align:right">New Password:</td>
							<td style="text-align:left"><asp:TextBox ID="txtNewPassword" runat="server" Width="150PX" BackColor="lightyellow"  TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="vldNewPasswordRequired" runat="server" ControlToValidate="txtNewPassword" Text="*" ValidationGroup="submit" ErrorMessage="New Password Required"></asp:RequiredFieldValidator></td>
						</tr>
						<tr>
						<td style="text-align:right">Confirm Password:</td>
						<td style="text-align:left"><asp:TextBox ID="txtConfirmPassword" runat="server" Width="150PX" BackColor="lightyellow"  TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="vldConfirmPasswordRequired" runat="server" ControlToValidate="txtConfirmPassword" Text="*" ValidationGroup="submit" Display="Dynamic" ErrorMessage="Confirm Password Required"></asp:RequiredFieldValidator><asp:CompareValidator ID="vldCompareConfirmPassword" runat="server" ControlToValidate="txtConfirmPassword" Text="*" ControlToCompare="txtNewPassword" ValidationGroup="submit" ErrorMessage="Passwords don't match" Display="Dynamic"></asp:CompareValidator></td>
						</tr>
						<tr>
							<td style="text-align:right"></td>
							<td style="text-align:left"><asp:Button ID="btnSubmit" ValidationGroup="submit"  runat="server" Text="submit" />&nbsp;&nbsp;&nbsp<asp:Button ID="btnCancel" runat="server" ValidationGroup="cancel" Text="Cancel" /></td>						
												
						</tr>
						<tr>
							<td colspan="2"> <asp:Label ID="lblError" ForeColor="Red" runat="server" Visible="false"></asp:Label> </td>
						</tr>
						<tr>
							<td colspan ="2"><asp:ValidationSummary ID="vldSummarySubmit" ValidationGroup="submit" runat="server" DisplayMode="BulletList" /> </td>
						</tr>
						
					</table>
					</asp:Panel>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td colspan="3"><br /></td>
			</tr>
			<tr>
				<td style="width:400px;"></td>
				<td colspan="2" style="text-align:left"><asp:Button id="btnSave" Text="Save" ValidationGroup="save" Width="100px" Visible="false" runat="server" />&nbsp;&nbsp;&nbsp
				<asp:Button ID="btnChangePassword" runat="server" Text="Change Password" Visible="false" /> </td>				
			</tr>
    </table>
   
</asp:Content>