This commit is contained in:
Virtuworks 2013-11-08 16:34:04 -05:00
commit 376d0e0ba5
14 changed files with 83 additions and 118 deletions

View file

@ -120,11 +120,8 @@
<data name="chkEnableHardQuota.Text" xml:space="preserve">
<value>Enable Hard Quota:</value>
</data>
<data name="lblLocationDrive.Text" xml:space="preserve">
<value>Location Drive:</value>
</data>
<data name="lblSpacesFolder.Text" xml:space="preserve">
<value>Enterprise Storage Folder:</value>
<value>Enterprise Storage Path:</value>
</data>
<data name="lblDomain.Text" xml:space="preserve">
<value>Enterprise Storage Domain:</value>

View file

@ -2,7 +2,7 @@
<table cellpadding="1" cellspacing="0" width="100%">
<tr>
<td class="SubHead" width="200" nowrap>
<asp:Label ID="lblSpacesFolder" runat="server" meta:resourcekey="lblSpacesFolder" Text="User Packages Folder:"></asp:Label>
<asp:Label ID="lblSpacesFolder" runat="server" meta:resourcekey="lblSpacesFolder" Text="User Packages Path:"></asp:Label>
</td>
<td width="100%">
<asp:TextBox runat="server" ID="txtFolder" Width="300px" CssClass="NormalTextBox"></asp:TextBox></td>
@ -17,17 +17,6 @@
ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>
<asp:Label ID="lblLocationDrive" runat="server" meta:resourcekey="lblLocationDrive" Text="Location Drive:"></asp:Label>
</td>
<td width="100%">
<asp:TextBox runat="server" ID="txtLocationDrive" Width="50px" MaxLength="1" CssClass="NormalTextBox"></asp:TextBox>
<asp:RequiredFieldValidator ID="valLocationDrive" runat="server" ControlToValidate="txtLocationDrive"
ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap></td>
<td width="100%">

View file

@ -49,8 +49,7 @@ namespace WebsitePanel.Portal.ProviderControls
try
{
chkEnableHardQuota.Enabled = ES.Services.EnterpriseStorage.CheckFileServicesInstallation(PanelRequest.ServiceId);
txtLocationDrive.Enabled = chkEnableHardQuota.Enabled;
valLocationDrive.Enabled = chkEnableHardQuota.Enabled;
txtFolder.Enabled = chkEnableHardQuota.Enabled;
if (!chkEnableHardQuota.Enabled)
lblFileServiceInfo.Visible = true;
}
@ -62,18 +61,25 @@ namespace WebsitePanel.Portal.ProviderControls
public void BindSettings(StringDictionary settings)
{
txtFolder.Text = settings["UsersHome"];
txtLocationDrive.Text = settings["LocationDrive"];
string path = string.Format("{0}:\\{1}", settings["LocationDrive"], settings["UsersHome"]);
txtFolder.Text = path;
txtDomain.Text = settings["UsersDomain"];
chkEnableHardQuota.Checked = settings["EnableHardQuota"] == "true" ? true : false;
}
public void SaveSettings(StringDictionary settings)
{
settings["UsersHome"] = txtFolder.Text;
settings["LocationDrive"] = txtLocationDrive.Text;
settings["UsersDomain"] = txtDomain.Text;
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
var drive = System.IO.Path.GetPathRoot(txtFolder.Text);
var folder = txtFolder.Text.Replace(drive, string.Empty);
if (!string.IsNullOrEmpty(drive) && !string.IsNullOrEmpty(folder))
{
settings["LocationDrive"] = drive.Split(':')[0];
settings["UsersHome"] = folder;
settings["UsersDomain"] = txtDomain.Text;
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
}
}
}
}

View file

@ -26,6 +26,34 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -85,33 +113,6 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valDomain;
/// <summary>
/// lblLocationDrive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblLocationDrive;
/// <summary>
/// txtLocationDrive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtLocationDrive;
/// <summary>
/// valLocationDrive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valLocationDrive;
/// <summary>
/// chkEnableHardQuota control.
/// </summary>