<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageCreateDriveMap.ascx.cs" Inherits="SolidCP.Portal.ExchangeServer.EnterpriseStorageCreateDriveMap" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="scp" %>
<%@ Register Src="UserControls/EmailAddress.ascx" TagName="EmailAddress" TagPrefix="scp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="scp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>

<scp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>


				<div class="panel-heading"><h3 class="panel-title">
					<asp:Image ID="imgESDM" SkinID="EnterpriseStorageDriveMaps48" runat="server" />
					<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create New Drive Map"></asp:Localize>
				</h3>
                    </div>
				<div class="panel-body form-horizontal">
				    <scp:SimpleMessageBox id="messageBox" runat="server" />
                  
					<table>
					    <tr>
						    <td class="FormLabel150"><asp:Localize ID="locDriveLetter" runat="server" meta:resourcekey="locDriveLetter" Text="Select Drive Letter:"></asp:Localize></td>
						    <td>
							    <asp:DropDownList ID="ddlLetters" runat="server" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;" />
						    </td>
					    </tr>
                        <tr>
							<td class="FormLabel150"><asp:Localize ID="locFolder" runat="server" meta:resourcekey="locFolder" Text="Storage Folder:"></asp:Localize></td>
							<td> 
                                <div class="Folders" style="display:inline;">
                                    <asp:DropDownList ID="ddlFolders" runat="server" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;" />  
                                    <asp:HiddenField id="txtFolderName" runat="server"/>                  
                                </div>
                                <div class="Url" style="display:inline;">
                                    <asp:Literal ID="lbFolderUrl" runat="server"></asp:Literal>
                                </div>
							</td>
						</tr>
                        <tr>
                            <td class="FormLabel150"><asp:Localize ID="locDriveLabel" runat="server" meta:resourcekey="locDriveLabel" Text="Label As:"></asp:Localize></td>
						    <td>
                                <div class="LabelAs">
							        <asp:TextBox ID="txtLabelAs" runat="server" CssClass="NormalTextBox" Width="145px"></asp:TextBox>
                                    
                                </div>
						    </td>
					    </tr>
					</table> 
				</div>
				<div class="panel-footer text-right">
					    <CPCC:StyleButton id="btnCreate" CssClass="btn btn-success" runat="server" OnClick="btnCreate_Click" ValidationGroup="CreateDriveMap"> <i class="fa fa-check">&nbsp;</i>&nbsp;<asp:Localize runat="server" meta:resourcekey="btnCreateText"/> </CPCC:StyleButton>
					    <asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateDriveMap" />
				</div>	
<script type="text/javascript" >
    $('document').ready(function () {
        $('.LabelAs input').bind('click', function () { $('.LabelAs input').val(""); });

        $('.LabelAs input').bind('focusout', function () {
            if ($('.LabelAs input').val() == "") {
                $('.LabelAs input').val($('.Folders select option:selected').text());
            }
        });

        $('.Folders select').bind('change', function () {
            $('.LabelAs input').val($('.Folders select option:selected').text());
            $('.Url').text($('.Folders select option:selected').val());
            $('.Folders input').val($('.Folders select option:selected').text());
        });
    });
</script>