Websitepanel user account lockout and state management added
This commit is contained in:
parent
008fc296d5
commit
72348041f0
27 changed files with 1705 additions and 373 deletions
Binary file not shown.
After Width: | Height: | Size: 719 B |
|
@ -8,6 +8,11 @@
|
|||
EnableViewState="False" EmptyDataText="usersList"
|
||||
CssSelectorClass="NormalGridView">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage(Eval("LoginStatusId")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField SortExpression="Username" HeaderText="usersListUsername">
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id="lnkEdit" runat="server" NavigateUrl='<%# EditUrl("PeerID", Eval("UserID").ToString(), "edit_peer", "UserID=" + PanelSecurity.SelectedUserId.ToString()) %>'>
|
||||
|
|
|
@ -86,5 +86,34 @@ namespace WebsitePanel.Portal
|
|||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected string GetStateImage(object status)
|
||||
{
|
||||
string imgName = "enabled.png";
|
||||
|
||||
if (status != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch ((int)status)
|
||||
{
|
||||
case (int)UserLoginStatus.Disabled:
|
||||
imgName = "disabled.png";
|
||||
break;
|
||||
case (int)UserLoginStatus.LockedOut:
|
||||
imgName = "locked.png";
|
||||
break;
|
||||
default:
|
||||
imgName = "enabled.png";
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,32 +1,3 @@
|
|||
// 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.
|
||||
|
|
|
@ -101,6 +101,18 @@
|
|||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="roleLoginStatus" runat="server">
|
||||
<td class="SubHead" valign="top">
|
||||
<asp:Label ID="lblLoginStatus" runat="server" meta:resourcekey="lblLoginStatus" Text="Login Status:"></asp:Label>
|
||||
</td>
|
||||
<td class="NormalBold" valign="top">
|
||||
<asp:DropDownList id="loginStatus" runat="server" resourcekey="loginStatus" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="Enabled"></asp:ListItem>
|
||||
<asp:ListItem Value="Disabled"></asp:ListItem>
|
||||
<asp:ListItem Value="Locked Out"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead">
|
||||
<asp:Label ID="lblDemoAccount" runat="server" meta:resourcekey="lblDemoAccount" Text="Demo Account:"></asp:Label>
|
||||
|
|
|
@ -127,6 +127,9 @@ namespace WebsitePanel.Portal
|
|||
if (user.RoleId == (int)UserRole.Reseller) role.SelectedIndex = 2;
|
||||
if (user.RoleId == (int)UserRole.Administrator) role.SelectedIndex = 2;
|
||||
|
||||
// select loginStatus
|
||||
loginStatus.SelectedIndex = user.LoginStatusId;
|
||||
|
||||
// contact info
|
||||
contact.CompanyName = user.CompanyName;
|
||||
contact.Address = user.Address;
|
||||
|
@ -194,6 +197,8 @@ namespace WebsitePanel.Portal
|
|||
user.Username = txtUsername.Text;
|
||||
user.Password = userPassword.Password;
|
||||
user.IsDemo = chkDemo.Checked;
|
||||
|
||||
user.LoginStatusId = loginStatus.SelectedIndex;
|
||||
|
||||
// contact info
|
||||
user.CompanyName = contact.CompanyName;
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
// 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.
|
||||
|
@ -302,6 +273,33 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlMailFormat;
|
||||
|
||||
/// <summary>
|
||||
/// roleLoginStatus control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow roleLoginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lblLoginStatus 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 lblLoginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// loginStatus 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.DropDownList loginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lblDemoAccount control.
|
||||
/// </summary>
|
||||
|
|
|
@ -88,6 +88,20 @@
|
|||
<asp:CheckBox id="chkDemo" runat="server" meta:resourcekey="chkDemo" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="roleLoginStatus" runat="server">
|
||||
<td class="SubHead" valign="top">
|
||||
<asp:Label ID="lblLoginStatus" runat="server" meta:resourcekey="lblLoginStatus" Text="Login Status:"></asp:Label>
|
||||
</td>
|
||||
<td class="NormalBold" valign="top">
|
||||
<asp:DropDownList id="loginStatus" runat="server" resourcekey="loginStatus" CssClass="NormalTextBox">
|
||||
<asp:ListItem Value="Enabled"></asp:ListItem>
|
||||
<asp:ListItem Value="Disabled"></asp:ListItem>
|
||||
<asp:ListItem Value="Locked Out"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="rowEcommerceEnbl" runat="server">
|
||||
<td class="SubHead"><asp:Localize runat="server" meta:resourcekey="lclEcommerceEnabled" /></td>
|
||||
<td class="Normal"><asp:CheckBox runat="server" ID="chkEcommerceEnbl" Text="Yes"/></td>
|
||||
|
|
|
@ -61,6 +61,9 @@ namespace WebsitePanel.Portal
|
|||
// select role
|
||||
Utils.SelectListItem(role, user.Role.ToString());
|
||||
|
||||
// select loginStatus
|
||||
loginStatus.SelectedIndex = user.LoginStatusId;
|
||||
|
||||
// bind ec
|
||||
chkEcommerceEnbl.Checked = user.EcommerceEnabled;
|
||||
BindEcommerceEnabled();
|
||||
|
@ -120,6 +123,8 @@ namespace WebsitePanel.Portal
|
|||
//
|
||||
user.EcommerceEnabled = chkEcommerceEnbl.Checked;
|
||||
|
||||
user.LoginStatusId = loginStatus.SelectedIndex;
|
||||
|
||||
// account info
|
||||
user.FirstName = Server.HtmlEncode(txtFirstName.Text);
|
||||
user.LastName = Server.HtmlEncode(txtLastName.Text);
|
||||
|
|
|
@ -210,6 +210,33 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkDemo;
|
||||
|
||||
/// <summary>
|
||||
/// roleLoginStatus control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow roleLoginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// lblLoginStatus 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 lblLoginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// loginStatus 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.DropDownList loginStatus;
|
||||
|
||||
/// <summary>
|
||||
/// rowEcommerceEnbl control.
|
||||
/// </summary>
|
||||
|
|
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="chkEnabled.Text" xml:space="preserve">
|
||||
<value>Enable Policy</value>
|
||||
|
@ -123,6 +123,9 @@
|
|||
<data name="chkNotEqualUsername.Text" xml:space="preserve">
|
||||
<value>Should not be equal to username</value>
|
||||
</data>
|
||||
<data name="lblLockedOut.Text" xml:space="preserve">
|
||||
<value>Lock out after # attempts:</value>
|
||||
</data>
|
||||
<data name="lblMaximumLength.Text" xml:space="preserve">
|
||||
<value>Maximum length:</value>
|
||||
</data>
|
||||
|
@ -141,6 +144,9 @@
|
|||
<data name="lblShouldContain.Text" xml:space="preserve">
|
||||
<value>Password should contain at least:</value>
|
||||
</data>
|
||||
<data name="valCorrectLockedOut.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="valCorrectMaxLength.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
|
|
|
@ -72,6 +72,18 @@
|
|||
<asp:CheckBox id="chkNotEqualUsername" runat="server" meta:resourcekey="chkNotEqualUsername" Text="Should not be equal to username" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="Normal">
|
||||
<asp:Label ID="lblLockedOut" runat="server"
|
||||
meta:resourcekey="lblLockedOut" Text="Lock out after :"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal"><asp:TextBox ID="txtLockedOut" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="valCorrectLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valCorrectLockedOut"
|
||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,10}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
|
|
|
@ -53,7 +53,9 @@ namespace WebsitePanel.Portal
|
|||
sb.Append(txtMinimumUppercase.Text).Append(";");
|
||||
sb.Append(txtMinimumNumbers.Text).Append(";");
|
||||
sb.Append(txtMinimumSymbols.Text).Append(";");
|
||||
sb.Append(chkNotEqualUsername.Checked.ToString());
|
||||
sb.Append(chkNotEqualUsername.Checked.ToString()).Append(";");
|
||||
sb.Append(txtLockedOut.Text).Append(";");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
set
|
||||
|
@ -67,6 +69,7 @@ namespace WebsitePanel.Portal
|
|||
txtMinimumUppercase.Text = "0";
|
||||
txtMinimumNumbers.Text = "0";
|
||||
txtMinimumSymbols.Text = "0";
|
||||
txtLockedOut.Text = "3";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -81,10 +84,11 @@ namespace WebsitePanel.Portal
|
|||
txtMinimumNumbers.Text = parts[4];
|
||||
txtMinimumSymbols.Text = parts[5];
|
||||
chkNotEqualUsername.Checked = Utils.ParseBool(parts[6], false);
|
||||
txtLockedOut.Text = parts[7];
|
||||
}
|
||||
catch { /* skip */ }
|
||||
}
|
||||
ToggleControls();
|
||||
ToggleControls();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,14 +96,14 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
}
|
||||
|
||||
private void ToggleControls()
|
||||
{
|
||||
PolicyTable.Visible = chkEnabled.Checked;
|
||||
}
|
||||
private void ToggleControls()
|
||||
{
|
||||
PolicyTable.Visible = chkEnabled.Checked;
|
||||
}
|
||||
|
||||
protected void chkEnabled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ToggleControls();
|
||||
}
|
||||
protected void chkEnabled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
ToggleControls();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,41 +1,276 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class PasswordPolicyEditor {
|
||||
protected System.Web.UI.UpdatePanel PasswordPolicyPanel;
|
||||
protected System.Web.UI.WebControls.CheckBox chkEnabled;
|
||||
protected System.Web.UI.HtmlControls.HtmlTable PolicyTable;
|
||||
protected System.Web.UI.WebControls.Label lblMinimumLength;
|
||||
protected System.Web.UI.WebControls.TextBox txtMinimumLength;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator valRequireMinLength;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator valCorrectMinLength;
|
||||
protected System.Web.UI.WebControls.Label lblMaximumLength;
|
||||
protected System.Web.UI.WebControls.TextBox txtMaximumLength;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator valRequireMaxLength;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator valCorrectMaxLength;
|
||||
protected System.Web.UI.WebControls.Label lblShouldContain;
|
||||
protected System.Web.UI.WebControls.Label lblMinimumUppercase;
|
||||
protected System.Web.UI.WebControls.TextBox txtMinimumUppercase;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator valRequireUppercase;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator valCorrectUppercase;
|
||||
protected System.Web.UI.WebControls.Label lblMinimumNumbers;
|
||||
protected System.Web.UI.WebControls.TextBox txtMinimumNumbers;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator valRequireNumbers;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator valCorrectNumbers;
|
||||
protected System.Web.UI.WebControls.Label lblMinimumSymbols;
|
||||
protected System.Web.UI.WebControls.TextBox txtMinimumSymbols;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator valRequireSymbols;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator valCorrectSymbols;
|
||||
protected System.Web.UI.HtmlControls.HtmlTableRow rowEqualUsername;
|
||||
protected System.Web.UI.WebControls.CheckBox chkNotEqualUsername;
|
||||
|
||||
/// <summary>
|
||||
/// PasswordPolicyPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel PasswordPolicyPanel;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnabled 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.CheckBox chkEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// PolicyTable control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTable PolicyTable;
|
||||
|
||||
/// <summary>
|
||||
/// lblMinimumLength 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 lblMinimumLength;
|
||||
|
||||
/// <summary>
|
||||
/// txtMinimumLength 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 txtMinimumLength;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireMinLength 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 valRequireMinLength;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectMinLength 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.RegularExpressionValidator valCorrectMinLength;
|
||||
|
||||
/// <summary>
|
||||
/// lblMaximumLength 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 lblMaximumLength;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaximumLength 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 txtMaximumLength;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireMaxLength 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 valRequireMaxLength;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectMaxLength 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.RegularExpressionValidator valCorrectMaxLength;
|
||||
|
||||
/// <summary>
|
||||
/// lblShouldContain 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 lblShouldContain;
|
||||
|
||||
/// <summary>
|
||||
/// lblMinimumUppercase 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 lblMinimumUppercase;
|
||||
|
||||
/// <summary>
|
||||
/// txtMinimumUppercase 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 txtMinimumUppercase;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireUppercase 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 valRequireUppercase;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectUppercase 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.RegularExpressionValidator valCorrectUppercase;
|
||||
|
||||
/// <summary>
|
||||
/// lblMinimumNumbers 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 lblMinimumNumbers;
|
||||
|
||||
/// <summary>
|
||||
/// txtMinimumNumbers 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 txtMinimumNumbers;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireNumbers 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 valRequireNumbers;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectNumbers 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.RegularExpressionValidator valCorrectNumbers;
|
||||
|
||||
/// <summary>
|
||||
/// lblMinimumSymbols 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 lblMinimumSymbols;
|
||||
|
||||
/// <summary>
|
||||
/// txtMinimumSymbols 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 txtMinimumSymbols;
|
||||
|
||||
/// <summary>
|
||||
/// valRequireSymbols 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 valRequireSymbols;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectSymbols 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.RegularExpressionValidator valCorrectSymbols;
|
||||
|
||||
/// <summary>
|
||||
/// rowEqualUsername control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowEqualUsername;
|
||||
|
||||
/// <summary>
|
||||
/// chkNotEqualUsername 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.CheckBox chkNotEqualUsername;
|
||||
|
||||
/// <summary>
|
||||
/// lblLockedOut 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 lblLockedOut;
|
||||
|
||||
/// <summary>
|
||||
/// txtLockedOut 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 txtLockedOut;
|
||||
|
||||
/// <summary>
|
||||
/// valCorrectLockedOut 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.RegularExpressionValidator valCorrectLockedOut;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
DataSourceID="odsUsersPaged" EnableViewState="False"
|
||||
EmptyDataText="gvUsers">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="img2" runat="server" Width="16px" Height="16px" ImageUrl='<%# GetStateImage(Eval("LoginStatusId")) %>' ImageAlign="AbsMiddle" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField SortExpression="Username" HeaderText="gvUsersUsername" HeaderStyle-Wrap="false">
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id=lnkEdit runat="server" NavigateUrl='<%# GetUserHomePageUrl((int)Eval("UserID")) %>'>
|
||||
|
|
|
@ -37,6 +37,8 @@ using System.Web.UI.WebControls;
|
|||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class UserCustomers : WebsitePanelModuleBase
|
||||
|
@ -85,5 +87,37 @@ namespace WebsitePanel.Portal
|
|||
Response.Redirect(EditUrl(PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), "create_user",
|
||||
"frm=customers"));
|
||||
}
|
||||
|
||||
protected string GetStateImage(object status)
|
||||
{
|
||||
string imgName = "enabled.png";
|
||||
|
||||
if (status != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch ((int)status)
|
||||
{
|
||||
case (int)UserLoginStatus.Disabled:
|
||||
imgName = "disabled.png";
|
||||
break;
|
||||
case (int)UserLoginStatus.LockedOut:
|
||||
imgName = "locked.png";
|
||||
break;
|
||||
default:
|
||||
imgName = "enabled.png";
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return GetThemedImage("Exchange/" + imgName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -106,6 +106,7 @@
|
|||
<Content Include="App_Themes\Default\Images\Exchange\disabled.png" />
|
||||
<Content Include="App_Themes\Default\Images\Exchange\disabled_16.png" />
|
||||
<Content Include="App_Themes\Default\Images\Exchange\enabled.png" />
|
||||
<Content Include="App_Themes\Default\Images\Exchange\locked.png" />
|
||||
<Content Include="App_Themes\Default\Images\Exchange\lync16.png" />
|
||||
<Content Include="App_Themes\Default\Images\FileManager\vbhtml.png" />
|
||||
<Content Include="App_Themes\Default\Images\lync16.png" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue