<%@ Page Title="" Language="C#" MasterPageFile="~/UGCCNG.Master" AutoEventWireup="true" CodeBehind="subaccounts.aspx.cs" Inherits="UGCC_Sharp.subaccounts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .confi
        {
            text-align: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="panel panel-default">
  <div class="panel-heading">About sub-accounts</div>
  <div class="panel-body">
    This page allows you to create accounts for your clan/guild members, 
    friends, and etc.&nbsp; To create a new account, click the &#39;Create new subuser&#39; button below and type the username.&nbsp; Then select the new/desired user in the drop 
    down box, then select the server and then set the permissions you want to give to the 
    user for the selected server.&nbsp; Click &#39;Update&#39; when done making any changes before switching 
    users or servers.
  </div>
    <div class="panel-body">
        <div class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label">User</label>
                <div class="col-sm-10">
                    <asp:DropDownList ID="ddlUsers" runat="server" AutoPostBack="True"
                        CssClass="form-control"
                        OnSelectedIndexChanged="ddlUsers_SelectedIndexChanged">
                    </asp:DropDownList>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">Password</label>
                <div class="col-sm-10">
                    <asp:TextBox ID="txtPW" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">Email</label>
                <div class="col-sm-10">
                    <asp:TextBox ID="txtEmail" runat="server" CssClass="form-control"></asp:TextBox>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">My Servers</label>
                <div class="col-sm-10">
                    <asp:ListBox ID="lstServers" runat="server" AutoPostBack="True"
                        CssClass="form-control"
                        OnSelectedIndexChanged="lstServers_SelectedIndexChanged" Height="200px"></asp:ListBox>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">Permissions to grant user for this server</label>
                <div class="col-sm-10">
                    <table id="Table1" class="table table-responsive table-bordered">
                        <tr>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox1" runat="server"
                                            type="checkbox"></asp:CheckBox>Start server
                                    </label>
                                </div>
                            </td>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox4" runat="server"
                                            type="checkbox"></asp:CheckBox>Update/Mod Installer tool</label>
                                </div>
                            </td>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox7" runat="server"
                                            type="checkbox"></asp:CheckBox>View notes</label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox2" runat="server" type="checkbox"></asp:CheckBox>Stop server</label>
                                </div>
                            </td>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox5" runat="server"
                                            type="checkbox"></asp:CheckBox>Extras tool</label>
                                </div>
                            </td>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox8" runat="server"
                                            type="checkbox" />Modify restart schedule</label>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox3" runat="server"
                                            type="checkbox"></asp:CheckBox>Edit command line and variables</label>
                                </div>
                            </td>
                            <td>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="CheckBox6" runat="server"
                                            type="checkbox"></asp:CheckBox>File tool</label>
                                </div>
                            </td>
                            <td>
                                <p align="right" style="text-align: center">
                                    <asp:Button ID="Button2" runat="server" CssClass="btn btn-default"
                                        OnClick="Button2_Click" Text="Select All" />
                                    &nbsp;<asp:Button ID="Button1" runat="server" CssClass="btn btn-default" OnClick="Button1_Click"
                                        Text="Clear" />
                                </p>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>
    

<div class="alert" id="lblError" runat="server" visible=false>

</div>
    <br />
    <asp:Button ID="btnSave" runat="server" CssClass="btn btn-primary" Text="Update" 
        onclick="btnSave_Click" />
    &nbsp;<asp:Button ID="btnNotify" runat="server" CssClass="btn btn-info" Text="Email account details to user" OnClick="btnNotify_Click"
         />
    <button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">
        Create new subuser
    </button>
    &nbsp;<asp:Button ID="btnDel" runat="server" CssClass="btn btn-danger" Text="Delete"
        OnClick="btnDel_Click" />
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">Create a new subuser account</h4>
                </div>
                <div class="modal-body">
                    <div class="input-group">
                        <asp:TextBox ID="txtNew" runat="server" CssClass="form-control"
                            placeholder="Name for new account"></asp:TextBox>
                        <span class="input-group-btn">
                            <asp:Button ID="btnNew" runat="server" CssClass="btn btn-primary" OnClick="btnNew_Click"
                                Text="Create New Account" />
                        </span>
                    </div>                    
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    
                </div>
            </div>
        </div>
    </div>

</asp:Content>
