This commit is contained in:
me 2015-04-29 10:15:41 +04:00
commit ec10aa7f0c
328 changed files with 70724 additions and 2992 deletions

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="gvType.Header" xml:space="preserve">
<value>Type</value>
</data>
<data name="gvText.Header" xml:space="preserve">
<value>Search text</value>
</data>
<data name="gvFullType.Header" xml:space="preserve">
<value>Full Type</value>
</data>
</root>

View file

@ -141,6 +141,12 @@
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
<value>No Changes Text Body:</value>
</data>
<data name="lblPasswordResetLinkSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Sms Body:</value>
</data>
<data name="lblPasswordResetPincodeSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Pincode Body:</value>
</data>
<data name="lblPriority.Text" xml:space="preserve">
<value>Priority:</value>
</data>

View file

@ -180,4 +180,16 @@
<data name="locEnablePasswordReset.Text" xml:space="preserve">
<value>Enable password reset:</value>
</data>
<data name="lblAccountSid.Text" xml:space="preserve">
<value>AccountSID</value>
</data>
<data name="lblAuthToken.Text" xml:space="preserve">
<value>AuthToken</value>
</data>
<data name="lblPhoneFrom.Text" xml:space="preserve">
<value>Phone From</value>
</data>
<data name="TwilioSettings.Text" xml:space="preserve">
<value>Twilio</value>
</data>
</root>

View file

@ -0,0 +1,68 @@
using System;
using System.Web;
using System.Web.Script.Serialization;
using System.Collections.Generic;
using System.Data;
using WebsitePanel.Portal;
namespace WebsitePanel.WebPortal
{
public class WebsitePanelAjaxHandler : IHttpHandler
{
public bool IsReusable { get { return true; } }
public void ProcessRequest(HttpContext context)
{
String filterValue = context.Request.Params["term"];
String fullType = context.Request.Params["fullType"];
String columnType = context.Request.Params["columnType"];
if (fullType == "Spaces")
{
String strItemType = context.Request.Params["itemType"];
int itemType = Int32.Parse(strItemType);
DataSet dsObjectItems = ES.Services.Packages.SearchServiceItemsPaged(PanelSecurity.EffectiveUserId, itemType,
String.Format("%{0}%", filterValue),
"",0, 100);
DataTable dt = dsObjectItems.Tables[1];
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
for (int i = 0; i < dt.Rows.Count; ++i)
{
DataRow row = dt.Rows[i];
Dictionary<string, string> obj = new Dictionary<string, string>();
obj["ColumnType"] = "PackageName";
obj["TextSearch"] = row["PackageName"].ToString();
obj["FullType"] = "Space";
dataList.Add(obj);
}
var jsonSerialiser = new JavaScriptSerializer();
var json = jsonSerialiser.Serialize(dataList);
context.Response.ContentType = "text/plain";
context.Response.Write(json);
}
else
{
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
String.Format("%{0}%", filterValue),
0, 0, "", 0, 100, columnType);
DataTable dt = dsObjectItems.Tables[2];
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
for (int i = 0; i < dt.Rows.Count; ++i)
{
DataRow row = dt.Rows[i];
Dictionary<string, string> obj = new Dictionary<string, string>();
obj["ColumnType"] = row["ColumnType"].ToString();
obj["TextSearch"] = row["TextSearch"].ToString();
obj["FullType"] = row["FullType"].ToString();
dataList.Add(obj);
}
var jsonSerialiser = new JavaScriptSerializer();
var json = jsonSerialiser.Serialize(dataList);
context.Response.ContentType = "text/plain";
context.Response.Write(json);
}
}
}
};

View file

@ -36,6 +36,7 @@ using System.Web.Caching;
using WebsitePanel.EnterpriseServer;
using System.Collections;
using System.Collections.Generic;
namespace WebsitePanel.Portal
{
@ -244,5 +245,33 @@ namespace WebsitePanel.Portal
return dsServiceItemsPaged.Tables[1];
}
#endregion
//TODO START
#region Service Items Paged Search
DataSet dsObjectItemsPaged;
public int SearchObjectItemsPagedCount(string filterColumn, string filterValue, string colType)
{
return (int)dsObjectItemsPaged.Tables[0].Rows[0][0];
}
public DataTable SearchObjectItemsPaged(int maximumRows, int startRowIndex, string sortColumn,
string filterColumn, string filterValue, string colType)
{
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
String.Format("%{0}%", filterValue),
0, 0, sortColumn, startRowIndex, maximumRows, colType);
return dsObjectItemsPaged.Tables[2];
}
public DataTable SearchObjectTypes(string filterColumn, string filterValue, string sortColumn)
{
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
String.Format("%{0}%", filterValue),
0, 0, sortColumn, 0, 0, "");
return dsObjectItemsPaged.Tables[1];
}
//TODO END
#endregion
}
}

View file

@ -219,4 +219,13 @@
<data name="valResetAccountLockout.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="lblMaxPasswordAge.Text" xml:space="preserve">
<value>Max Password Age (days):</value>
</data>
<data name="valCorrectMaxPasswordAge.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="valRequireMaxPasswordAge.Text" xml:space="preserve">
<value>*</value>
</data>
</root>

View file

@ -123,10 +123,22 @@
<data name="locEmailAddress.Text" xml:space="preserve">
<value>Email:</value>
</data>
<data name="locMobile.Text" xml:space="preserve">
<value>Mobile</value>
</data>
<data name="locReason.Text" xml:space="preserve">
<value>Reason:</value>
</data>
<data name="locSendTo.Text" xml:space="preserve">
<value>Send to:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Reset Password</value>
</data>
<data name="rbtnEmail.Text" xml:space="preserve">
<value>Email</value>
</data>
<data name="rbtnMobile.Text" xml:space="preserve">
<value>Mobile</value>
</data>
</root>

View file

@ -51,7 +51,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{
BindPasswordSettings();
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false, " ");
if (!string.IsNullOrEmpty(instructions))
{
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = true;

View file

@ -47,7 +47,12 @@ namespace WebsitePanel.Portal.ExchangeServer
// load content
litContent.Text = ES.Services.ExchangeServer.GetMailboxSetupInstructions(
PanelRequest.ItemID, PanelRequest.AccountID,
false, false, false);
false, false, false,
PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
"user_reset_password",
"SpaceID=" + PanelSecurity.PackageId,
"Context=Mailbox",
"AccountID=" + PanelRequest.AccountID).Trim('~'));
// bind user details
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);

View file

@ -7,35 +7,35 @@
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<wsp:EnableAsyncTasksSupport ID="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Settings"></asp:Localize>
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Settings"></asp:Localize>
<asp:Literal ID="litOrganizationName" runat="server" Text="Organization" />
</div>
<div class="FormBody">
<asp:Literal ID="litOrganizationName" runat="server" Text="Organization" />
</div>
<div class="FormBody">
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="organization_settings_password_settings" />
<wsp:CollectionTabs ID="tabs" runat="server" SelectedTab="organization_settings_password_settings" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<asp:UpdatePanel runat="server" ID="PasswordPolicyPanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<wsp:CollapsiblePanel id="colPasswordSettings" runat="server" TargetControlID="panelPasswordSettings" meta:resourcekey="colPasswordSettings" Text="Password settings">
</wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelPasswordSettings">
<table id="PolicyTable" runat="server" cellpadding="2">
<wsp:SimpleMessageBox ID="messageBox" runat="server" />
<asp:UpdatePanel runat="server" ID="PasswordPolicyPanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<wsp:CollapsiblePanel ID="colPasswordSettings" runat="server" TargetControlID="panelPasswordSettings" meta:ResourceKey="colPasswordSettings" Text="Password settings"></wsp:CollapsiblePanel>
<asp:Panel runat="server" ID="panelPasswordSettings">
<table id="PolicyTable" runat="server" cellpadding="2">
<tr>
<td class="Normal" style="width:150px;"><asp:Label ID="lblMinimumLength" runat="server"
meta:resourcekey="lblMinimumLength" Text="Minimum length:"></asp:Label></td>
<td class="Normal" style="width: 150px;">
<asp:Label ID="lblMinimumLength" runat="server"
meta:resourcekey="lblMinimumLength" Text="Minimum length:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtMinimumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireMinLength" runat="server" ControlToValidate="txtMinimumLength" meta:resourcekey="valRequireMinLength"
@ -44,19 +44,21 @@
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="Normal"><asp:Label ID="lblMaximumLength" runat="server"
meta:resourcekey="lblMaximumLength" Text="Maximum length:"></asp:Label></td>
<td class="Normal">
<asp:Label ID="lblMaximumLength" runat="server"
meta:resourcekey="lblMaximumLength" Text="Maximum length:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtMaximumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valRequireMaxLength"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valCorrectMaxLength"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
</td>
</td>
</tr>
<tr>
<td class="Normal" style="width:150px;"><asp:Label ID="lblEnforcePasswordHistory" runat="server"
meta:resourcekey="lblEnforcePasswordHistory" Text="Enforce Password History:"></asp:Label></td>
<td class="Normal" style="width: 150px;">
<asp:Label ID="lblEnforcePasswordHistory" runat="server"
meta:resourcekey="lblEnforcePasswordHistory" Text="Enforce Password History:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtEnforcePasswordHistory" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valRequireEnforcePasswordHistory"
@ -64,15 +66,27 @@
<asp:RegularExpressionValidator ID="valCorrectEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valCorrectEnforcePasswordHistory"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="Normal" style="width: 150px;">
<asp:Label ID="lblMaxPasswordAge" runat="server"
meta:resourcekey="lblMaxPasswordAge" Text="Max Password Age (days):"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtMaxPasswordAge" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valRequireMaxPasswordAge"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valCorrectMaxPasswordAge"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
</tr>
<tr id="RowChkLockOutSettigns" runat="server">
<td colspan="2" class="NormalBold">
<asp:CheckBox id="chkLockOutSettigns" runat="server" meta:resourcekey="chkLockOutSettigns"
Text="Enable Lockout Settings" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkLockOutSettigns_CheckedChanged" />
<asp:CheckBox ID="chkLockOutSettigns" runat="server" meta:resourcekey="chkLockOutSettigns"
Text="Enable Lockout Settings" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkLockOutSettigns_CheckedChanged" />
</td>
</tr>
<tr id="RowAccountLockoutDuration" runat="server">
<td class="Normal" style="width:150px;"><asp:Label ID="lblAccountLockoutDuration" runat="server"
meta:resourcekey="lblAccountLockoutDuration" Text="Account Lockout Duration (minutes):"></asp:Label></td>
<td class="Normal" style="width: 150px;">
<asp:Label ID="lblAccountLockoutDuration" runat="server"
meta:resourcekey="lblAccountLockoutDuration" Text="Account Lockout Duration (minutes):"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtAccountLockoutDuration" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireAccountLockoutDuration" runat="server" ControlToValidate="txtAccountLockoutDuration" meta:resourcekey="valRequireAccountLockoutDuration"
@ -85,7 +99,8 @@
<asp:Label ID="lblLockedOut" runat="server"
meta:resourcekey="lblLockedOut" Text="Account Lockout threshold:"></asp:Label>
</td>
<td class="Normal"><asp:TextBox ID="txtLockedOut" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<td class="Normal">
<asp:TextBox ID="txtLockedOut" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequiredLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valRequiredLockedOut"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valCorrectLockedOut"
@ -97,7 +112,8 @@
<asp:Label ID="lblResetAccountLockout" runat="server"
meta:resourcekey="lblResetAccountLockout" Text="Reset account lockout counter after (minutes):"></asp:Label>
</td>
<td class="Normal"><asp:TextBox ID="txtResetAccountLockout" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<td class="Normal">
<asp:TextBox ID="txtResetAccountLockout" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valRequireResetAccountLockout"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valResetAccountLockout"
@ -107,8 +123,8 @@
<tr>
<td colspan="2" class="NormalBold">
<asp:CheckBox id="chkPasswordComplexity" runat="server" meta:resourcekey="chkPasswordComplexity"
Text="Enable Password Complexity" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkPasswordComplexity_CheckedChanged" />
<asp:CheckBox ID="chkPasswordComplexity" runat="server" meta:resourcekey="chkPasswordComplexity"
Text="Enable Password Complexity" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkPasswordComplexity_CheckedChanged" />
</td>
</tr>
<tr id="RowMinimumUppercase" runat="server">
@ -116,31 +132,34 @@
<asp:Label ID="lblMinimumUppercase" runat="server"
meta:resourcekey="lblMinimumUppercase" Text="Uppercase letters:"></asp:Label>
</td>
<td class="Normal"><asp:TextBox ID="txtMinimumUppercase" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<td class="Normal">
<asp:TextBox ID="txtMinimumUppercase" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valRequireUppercase"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valCorrectUppercase"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
</td>
</td>
</tr>
<tr id="RowMinimumNumbers" runat="server">
<td class="Normal">
<asp:Label ID="lblMinimumNumbers" runat="server"
meta:resourcekey="lblMinimumNumbers" Text="Numbers:"></asp:Label>
</td>
<td class="Normal"><asp:TextBox ID="txtMinimumNumbers" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<td class="Normal">
<asp:TextBox ID="txtMinimumNumbers" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valRequireNumbers"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valCorrectNumbers"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
</td>
</td>
</tr>
<tr id="RowMinimumSymbols" runat="server">
<td class="Normal">
<asp:Label ID="lblMinimumSymbols" runat="server"
meta:resourcekey="lblMinimumSymbols" Text="Non-alphanumeric symbols:"></asp:Label>
</td>
<td class="Normal"><asp:TextBox ID="txtMinimumSymbols" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<td class="Normal">
<asp:TextBox ID="txtMinimumSymbols" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valRequireSymbols"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valCorrectSymbols"
@ -149,20 +168,20 @@
</tr>
<tr id="rowEqualUsername" runat="server" visible="false">
<td class="Normal" colspan="2">
<asp:CheckBox id="chkNotEqualUsername" runat="server" meta:resourcekey="chkNotEqualUsername" Text="Should not be equal to username" />
<asp:CheckBox ID="chkNotEqualUsername" runat="server" meta:resourcekey="chkNotEqualUsername" Text="Should not be equal to username" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SettingsEditor"
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel ID="buttonPanel" runat="server" ValidationGroup="SettingsEditor"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
@ -59,6 +60,8 @@ namespace WebsitePanel.Portal.ExchangeServer
txtResetAccountLockout.Text = PasswordPolicyEditor.GetValueSafe(parts, 10, "0");
chkLockOutSettigns.Checked = PasswordPolicyEditor.GetValueSafe(parts, 11, false);
chkPasswordComplexity.Checked = PasswordPolicyEditor.GetValueSafe(parts, 12, true);
txtMaxPasswordAge.Text = PasswordPolicyEditor.GetValueSafe(parts, 13, "42");
}
private void BindSettings(OrganizationPasswordSettings settings)
@ -75,6 +78,8 @@ namespace WebsitePanel.Portal.ExchangeServer
txtResetAccountLockout.Text = settings.ResetAccountLockoutCounterAfter.ToString();
chkLockOutSettigns.Checked = settings.LockoutSettingsEnabled;
chkPasswordComplexity.Checked = settings.PasswordComplexityEnabled;
txtMaxPasswordAge.Text = settings.MaxPasswordAge.ToString();
}
private OrganizationPasswordSettings GetSettings()
@ -94,6 +99,8 @@ namespace WebsitePanel.Portal.ExchangeServer
settings.LockoutSettingsEnabled = chkLockOutSettigns.Checked;
settings.PasswordComplexityEnabled =chkPasswordComplexity.Checked;
settings.MaxPasswordAge = Utils.ParseInt(txtMaxPasswordAge.Text, 42);
return settings;
}

View file

@ -210,6 +210,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
/// <summary>
/// lblMaxPasswordAge 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 lblMaxPasswordAge;
/// <summary>
/// txtMaxPasswordAge 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 txtMaxPasswordAge;
/// <summary>
/// valRequireMaxPasswordAge 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 valRequireMaxPasswordAge;
/// <summary>
/// valCorrectMaxPasswordAge 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 valCorrectMaxPasswordAge;
/// <summary>
/// RowChkLockOutSettigns control.
/// </summary>

View file

@ -4,42 +4,69 @@
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
-
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div>
<div class="FormBody">
<table>
<tr>
<td class="FormLabel150" valign="top"><asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress" ></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200"/>
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
<td>
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button id="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
</div>
</div>
</div>
</div>
</div>
<div class="FormBody">
<asp:UpdatePanel ID="PasswrodResetUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locSendTo" runat="server" meta:resourcekey="locSendTo" Text="Send to:"></asp:Localize></td>
<td class="FormRBtnL">
<asp:RadioButton ID="rbtnEmail" runat="server" meta:resourcekey="rbtnEmail" Text="Email" GroupName="SendToGroup" AutoPostBack="true" Checked="true" OnCheckedChanged="SendToGroupCheckedChanged" />
<asp:RadioButton ID="rbtnMobile" runat="server" meta:resourcekey="rbtnMobile" Text="Mobile" GroupName="SendToGroup" AutoPostBack="true" OnCheckedChanged="SendToGroupCheckedChanged" />
<br />
<br />
</td>
</tr>
<tr id="EmailRow" runat="server">
<td class="FormLabel150" valign="top">
<asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress"></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200" />
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr id="MobileRow" runat="server" visible="False">
<td class="FormLabel150" valign="top">
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtMobile" CssClass="TextBox200" />
<asp:RequiredFieldValidator ID="valMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexMobileValid" runat="server" ValidationExpression="^\+?\d+$" ValidationGroup="ResetUserPassword" ControlToValidate="txtMobile" ErrorMessage="Invalid Mobile Format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
<td>
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<div class="FormFooterClean">
<asp:Button ID="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -26,6 +26,8 @@ namespace WebsitePanel.Portal.ExchangeServer
litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
txtEmailAddress.Text = user.PrimaryEmailAddress;
txtMobile.Text = user.MobilePhone;
}
protected void btnResetPassoword_Click(object sender, EventArgs e)
@ -35,11 +37,31 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text);
if (rbtnEmail.Checked)
{
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text, true);
}
else
{
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID, PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
if (!result.IsSuccess)
{
ShowErrorMessage("SEND_USER_PASSWORD_RESET_SMS");
return;
}
}
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
(PanelRequest.Context == "Mailbox") ? "mailboxes" : "users",
"SpaceID=" + PanelSecurity.PackageId));
}
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
{
EmailRow.Visible = rbtnEmail.Checked;
MobileRow.Visible = !rbtnEmail.Checked;
}
}
}

View file

@ -39,6 +39,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// PasswrodResetUpdatePanel 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 PasswrodResetUpdatePanel;
/// <summary>
/// locSendTo 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.Localize locSendTo;
/// <summary>
/// rbtnEmail 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.RadioButton rbtnEmail;
/// <summary>
/// rbtnMobile 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.RadioButton rbtnMobile;
/// <summary>
/// EmailRow 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 EmailRow;
/// <summary>
/// locEmailAddress control.
/// </summary>
@ -75,6 +120,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexEmailValid;
/// <summary>
/// MobileRow 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 MobileRow;
/// <summary>
/// locMobile 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.Localize locMobile;
/// <summary>
/// txtMobile 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 txtMobile;
/// <summary>
/// valMobile 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 valMobile;
/// <summary>
/// regexMobileValid 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 regexMobileValid;
/// <summary>
/// locReason control.
/// </summary>

View file

@ -70,7 +70,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (!hideItems) tabsList.Add(CreateTab("mailbox_mailflow", "Tab.Mailflow"));
if (!hideItems) tabsList.Add(CreateTab("mailbox_permissions", "Tab.Permissions"));
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false, " ");
if (!string.IsNullOrEmpty(instructions))
tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup"));

View file

@ -0,0 +1,125 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchObject.ascx.cs" Inherits="WebsitePanel.Portal.SearchObject" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<script>
var estop = function (e) {
if (!e) e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return e;
}
var CPopupDialog = function (el, e) {
if (typeof el == 'string')
el = document.getElementById(el);
e = estop(e);
var oldclick = document.body.onclick;
el.onclick = estop;
function close() {
el.style.display = "none";
document.body.onclick = oldclick;
}
function show(x, y) {
el.style.left = x ? x : e.clientX + document.documentElement.scrollLeft + "px";
el.style.top = y ? y : e.clientY + document.documentElement.scrollTop + "px";
el.style.display = "block";
document.body.onclick = close;
}
show();
};
$(document).ready(function () {
var loadFilters = function()
{
var typesSelected = JSON.parse($("#tbFilters").val());
$("#mydialog input[rel]").each(function () {
var rel = $(this).attr('rel');
if (typesSelected.indexOf(rel) >= 0)
$(this).val("1");
})
}
$("#btnSelectFilter").click(function(e)
{
var typesSelected = [];
$("#mydialog input[rel]").each(function () {
var val = $(this).attr("checked");
if (val) typesSelected.push($(this).attr('rel'));
});
$("#tbFilters").val(JSON.stringify(typesSelected));
document.forms[0].submit();
})
loadFilters();
});
</script>
<asp:GridView id="gvObjects" runat="server" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting="True"
CssSelectorClass="NormalGridView"
DataSourceID="odsObjectsPaged" EnableViewState="False"
EmptyDataText="gvObjects">
<Columns>
<asp:TemplateField HeaderText="gvType" SortExpression="ColumnType">
<HeaderTemplate>
<a href="javascript: void(0)" onclick="CPopupDialog('mydialog',event)">Type</a>
</HeaderTemplate>
<ItemTemplate>
<%# Eval("ColumnType") %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField SortExpression="TextSearch" HeaderText="gvText" HeaderStyle-Wrap="false">
<ItemTemplate>
<asp:hyperlink id=lnkUser runat="server" NavigateUrl='<%# GetItemPageUrl((string)Eval("FullType"), (string)Eval("ColumnType"), (int)Eval("ItemID"), (int)Eval("PackageID")) %>'>
<%# Eval("TextSearch") %>
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FullType" HtmlEncode="false" SortExpression="FullType" HeaderText="gvFullType">
<HeaderStyle Wrap="false" />
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsObjectsPaged" runat="server" EnablePaging="True" SelectCountMethod="SearchObjectItemsPagedCount"
SelectMethod="SearchObjectItemsPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.PackagesHelper" OnSelected="odsObjectPaged_Selected" OnSelecting="odsObjectPaged_Selecting">
<SelectParameters>
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsObjectTypes" runat="server" EnablePaging="false"
SelectMethod="SearchObjectTypes" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.PackagesHelper">
<SelectParameters>
<asp:QueryStringParameter Name="filterColumn" QueryStringField="Criteria" />
<asp:QueryStringParameter Name="filterValue" QueryStringField="Query" />
</SelectParameters>
</asp:ObjectDataSource>
<div id="mydialog" class="ui-popupdialog">
<div class="title">Select filter</div>
<div class="content">
<asp:GridView runat="server" DataSourceID="odsObjectTypes" SortParameterName="sortColumn" ShowHeader="false" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<input type="checkbox" runat="server" rel='<%# Eval("ColumnType") %>'></input>
<%# Eval("ColumnType") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div class="actions">
<a id="btnSelectFilter" href="javascript: void(0)" class="ui-button">Apply</a>
<a onclick="document.body.onclick.apply(event)" href="javascript: void(0)" class="ui-button">Close</a>
<div style="clear:both"></div>
</div>
<asp:TextBox ClientIDMode="Static" ID="tbFilters" type="hidden" runat="server"></asp:TextBox>
</div>

View file

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Serialization;
using WebsitePanel.WebPortal;
namespace WebsitePanel.Portal
{
public partial class SearchObject : WebsitePanelModuleBase
{
const string TYPE_WEBSITE = "WebSite";
const string TYPE_DOMAIN = "Domain";
const string TYPE_ORGANIZATION = "Organization";
const string PID_SPACE_WEBSITES = "SpaceWebSites";
const string PID_SPACE_DIMAINS = "SpaceDomains";
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
String m_strColTypes = "";
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
var jsonSerialiser = new JavaScriptSerializer();
String[] aTypes = jsonSerialiser.Deserialize<String[]>(tbFilters.Text);
if ((aTypes != null) && (aTypes.Length > 0))
m_strColTypes = "'" + String.Join("','", aTypes) + "'";
else
m_strColTypes = "";
}
}
protected void odsObjectPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["colType"] = m_strColTypes;
}
protected void odsObjectPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
ProcessException(e.Exception.InnerException);
e.ExceptionHandled = true;
}
}
public string GetItemPageUrl(string fullType, string itemType, int itemId, int spaceId)
{
string res = "";
if (fullType.Equals("Users"))
{
res = PortalUtils.GetUserHomePageUrl(itemId);
}
else
{
switch (itemType)
{
case TYPE_WEBSITE:
res = PortalUtils.NavigatePageURL(PID_SPACE_WEBSITES, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
"moduleDefId=websites");
break;
case TYPE_DOMAIN:
res = PortalUtils.NavigatePageURL(PID_SPACE_DIMAINS, "DomainID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
"moduleDefId=domains");
break;
case TYPE_ORGANIZATION:
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "organization_home",
"moduleDefId=ExchangeServer");
break;
default:
res = PortalUtils.GetSpaceHomePageUrl(itemId);
break;
}
}
return res;
}
}
}

View file

@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SearchObject {
/// <summary>
/// gvObjects 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.GridView gvObjects;
/// <summary>
/// odsObjectsPaged 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.ObjectDataSource odsObjectsPaged;
/// <summary>
/// odsObjectTypes 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.ObjectDataSource odsObjectTypes;
/// <summary>
/// tbFilters 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 tbFilters;
}
}

View file

@ -3,13 +3,94 @@
<%@ Register Src="UserControls/ServerDetails.ascx" TagName="ServerDetails" TagPrefix="uc3" %>
<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$("#tbSearch").autocomplete({
zIndex: 100,
source: function (request, response) {
$.ajax({
type: "post",
dataType: "json",
data: {
term: request.term,
fullType: 'Spaces',
itemType: $("#ddlItemType").val()
},
url: "AjaxHandler.ashx",
success: function (data) {
response($.map(data, function (item) {
return {
label: item.TextSearch,
code: item
};
}));
}
})
},
select: function (event, ui) {
var item = ui.item;
$("#ddlItemType").val(item.code.ColumnType);
$("#tbSearchFullType").val(item.code.FullType);
$("#tbSearchText").val(item.code.TextSearch);
}
});
});//]]>
</script>
<div class="FormButtonsBar">
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
<asp:DropDownList ID="ddlItemType" runat="server" CssClass="NormalTextBox">
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" SkinID="SearchButton" meta:resourcekey="cmdSearch"
CausesValidation="false" OnClick="cmdSearch_Click" />
<asp:Panel ID="tblSearch" runat="server" DefaultButton="ImageButton1" CssClass="NormalBold">
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
<div align="center">
<table>
<tr>
<td>
<asp:DropDownList ClientIDMode="Static" ID="ddlItemType" runat="server" CssClass="NormalTextBox">
</asp:DropDownList>
</td>
<td>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left" class="SearchQuery">
<div class="ui-widget">
<asp:TextBox
ID="tbSearch"
ClientIDMode="Static"
runat="server"
CssClass="NormalTextBox"
Width="120px"
style="vertical-align: middle; z-index: 100;"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchFullType"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchText"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton
ID="ImageButton1"
runat="server"
SkinID="SearchButton"
OnClick="cmdSearch_Click"
CausesValidation="false"
style="vertical-align: middle;"
/>
</div>
</td>
</tr>
</table>
</td>
</tr>
</asp:Panel>
</div>

View file

@ -77,7 +77,7 @@ namespace WebsitePanel.Portal
// bind filter
Utils.SelectListItem(ddlItemType, Request["ItemTypeID"]);
txtFilterValue.Text = Request["Query"];
tbSearch.Text = Request["Query"];
}
}
@ -119,7 +119,9 @@ namespace WebsitePanel.Portal
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{
string query = txtFilterValue.Text.Trim().Replace("%", "");
string query = tbSearchText.Text.Trim().Replace("%", "");
if (query.Length == 0)
query = tbSearch.Text.Trim().Replace("%", "");
Response.Redirect(NavigateURL(
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -68,22 +40,40 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.WebControls.DropDownList ddlItemType;
/// <summary>
/// txtFilterValue control.
/// tbSearch 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 txtFilterValue;
protected global::System.Web.UI.WebControls.TextBox tbSearch;
/// <summary>
/// cmdSearch control.
/// tbSearchFullType 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.ImageButton cmdSearch;
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
/// <summary>
/// tbSearchText 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 tbSearchText;
/// <summary>
/// ImageButton1 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.ImageButton ImageButton1;
/// <summary>
/// gvPackages control.

View file

@ -5,16 +5,100 @@
<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$("#tbSearch").autocomplete({
zIndex: 100,
source: function (request, response) {
$.ajax({
type: "post",
dataType: "json",
data: {
term: request.term,
fullType: 'Users',
columnType: "'" + $("#ddlFilterColumn").val() + "'"
},
url: "AjaxHandler.ashx",
success: function (data) {
response($.map(data, function (item) {
return {
label: item.TextSearch,
code: item
};
}));
}
})
},
select: function (event, ui) {
var item = ui.item;
$("#ddlFilterColumn").val(item.code.ColumnType);
$("#tbSearchFullType").val(item.code.FullType);
$("#tbSearchText").val(item.code.TextSearch);
}
});
});//]]>
</script>
<div class="FormButtonsBar">
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
<asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold" DefaultButton="ImageButton1">
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch"></asp:Label>
<asp:DropDownList ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn">
<asp:ListItem Value="Username">Username</asp:ListItem>
<asp:ListItem Value="Email">Email</asp:ListItem>
<asp:ListItem Value="FullName">FullName</asp:ListItem>
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" SkinID="SearchButton" meta:resourcekey="cmdSearch"
CausesValidation="false" OnClick="cmdSearch_Click" />
<div align="center">
<table>
<tr>
<td>
<asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn">
<asp:ListItem Value="Username">Username</asp:ListItem>
<asp:ListItem Value="Email">Email</asp:ListItem>
<asp:ListItem Value="FullName">FullName</asp:ListItem>
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left" class="SearchQuery">
<div class="ui-widget">
<asp:TextBox
ID="tbSearch"
ClientIDMode="Static"
runat="server"
CssClass="NormalTextBox"
Width="120px"
style="vertical-align: middle; z-index: 100;"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchFullType"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchText"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton
ID="ImageButton1"
runat="server"
SkinID="SearchButton"
OnClick="cmdSearch_Click"
CausesValidation="false"
style="vertical-align: middle;"
/>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</asp:Panel>
</div>

View file

@ -46,7 +46,7 @@ namespace WebsitePanel.Portal
if (!IsPostBack)
{
Utils.SelectListItem(ddlFilterColumn, Request["Criteria"]);
txtFilterValue.Text = Request["Query"];
tbSearch.Text = Request["Query"];
}
}
@ -57,7 +57,9 @@ namespace WebsitePanel.Portal
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{
string query = txtFilterValue.Text.Trim().Replace("%", "");
string query = tbSearchText.Text.Trim().Replace("%", "");
if (query.Length == 0)
query = tbSearch.Text.Trim().Replace("%", "");
Response.Redirect(NavigateURL(
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -68,22 +40,40 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.WebControls.DropDownList ddlFilterColumn;
/// <summary>
/// txtFilterValue control.
/// tbSearch 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 txtFilterValue;
protected global::System.Web.UI.WebControls.TextBox tbSearch;
/// <summary>
/// cmdSearch control.
/// tbSearchFullType 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.ImageButton cmdSearch;
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
/// <summary>
/// tbSearchText 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 tbSearchText;
/// <summary>
/// ImageButton1 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.ImageButton ImageButton1;
/// <summary>
/// gvUsers control.

View file

@ -41,5 +41,20 @@
<td class="Normal" colspan="2">
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetLinkSmsBody" runat="server" meta:resourcekey="lblPasswordResetLinkSmsBody" Text="Password Reset Link Sms Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtBodyPasswordResetLinkSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetPincodeSmsBody" runat="server" meta:resourcekey="lblPasswordResetPincodeSmsBody" Text="Password Reset Link Pincode Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtPasswordResetPincodeSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -18,6 +18,9 @@ namespace WebsitePanel.Portal
txtHtmlBody.Text = settings["HtmlBody"];
txtTextBody.Text = settings["TextBody"];
txtLogoUrl.Text = settings["LogoUrl"];
txtBodyPasswordResetLinkSmsBody.Text = settings["PasswordResetLinkSmsBody"];
txtPasswordResetPincodeSmsBody.Text = settings["PasswordResetPincodeSmsBody"];
}
public void SaveSettings(UserSettings settings)
@ -28,6 +31,9 @@ namespace WebsitePanel.Portal
settings["HtmlBody"] = txtHtmlBody.Text;
settings["TextBody"] = txtTextBody.Text;
settings["LogoUrl"] = txtLogoUrl.Text;
settings["PasswordResetLinkSmsBody"]= txtBodyPasswordResetLinkSmsBody.Text;
settings["PasswordResetPincodeSmsBody"] =txtPasswordResetPincodeSmsBody.Text;
}
}
}

View file

@ -119,5 +119,41 @@ namespace WebsitePanel.Portal {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
/// <summary>
/// lblPasswordResetLinkSmsBody 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 lblPasswordResetLinkSmsBody;
/// <summary>
/// txtBodyPasswordResetLinkSmsBody 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 txtBodyPasswordResetLinkSmsBody;
/// <summary>
/// lblPasswordResetPincodeSmsBody 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 lblPasswordResetPincodeSmsBody;
/// <summary>
/// txtPasswordResetPincodeSmsBody 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 txtPasswordResetPincodeSmsBody;
}
}

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="gvType.Header" xml:space="preserve">
<value>Type</value>
</data>
<data name="gvText.Header" xml:space="preserve">
<value>Search text</value>
</data>
<data name="gvFullType.Header" xml:space="preserve">
<value>Full Type</value>
</data>
</root>

View file

@ -1,54 +1,87 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GlobalSearch.ascx.cs" Inherits="WebsitePanel.Portal.SkinControls.GlobalSearch" %>
<style>
.ui-menu-item a {white-space: nowrap; }
</style>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$("#<%= tbSearch.ClientID %>").autocomplete({
zIndex: 100,
source: function(request, response) {
$.ajax({
type: "post",
dataType: "json",
data: {
term: request.term
},
url: "AjaxHandler.ashx",
success: function(data)
{
response($.map(data, function (item) {
return {
label: item.TextSearch + " [" + item.FullType + "]",
code: item
};
}));
}
})
},
select: function (event, ui) {
var item = ui.item;
$("#<%= tbSearchColumnType.ClientID %>").val(item.code.ColumnType);
$("#<%= tbSearchFullType.ClientID %>").val(item.code.FullType);
$("#<%= tbSearchText.ClientID %>").val(item.code.TextSearch);
}
});
});//]]>
</script>
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left">
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="dlTabs_SelectedIndexChanged" RepeatLayout="Table">
<ItemStyle Wrap="false" VerticalAlign="Top" />
<ItemTemplate>
<asp:LinkButton ID="lnkTab" runat="server" CommandName="select"
CausesValidation="false" CssClass="SearchMethod">
<%# Eval("Name") %>
</asp:LinkButton>
</ItemTemplate>
<SelectedItemStyle Wrap="false" />
<SelectedItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td class="SearchMethodSide" valign="top"></td>
<td class="SearchMethodSelected" valign="top"><%# Eval("Name")%></td>
<td class="SearchMethodSide" valign="top"></td>
</tr>
</table>
</SelectedItemTemplate>
</asp:DataList>
</td>
</tr>
<tr>
<td align="left" class="SearchQuery">
<asp:MultiView ID="tabs" runat="server" ActiveViewIndex="0">
<asp:View ID="tabSearchUsers" runat="server">
<asp:Panel ID="pnlSearchUsers" runat="server" DefaultButton="btnSearchUsers">
<asp:DropDownList ID="ddlUserFields" runat="server" resourcekey="ddlUserFields" CssClass="NormalTextBox" Width="150px" style="vertical-align: middle;">
<asp:ListItem Value="Username">Username</asp:ListItem>
<asp:ListItem Value="Email">Email</asp:ListItem>
<asp:ListItem Value="FullName">FullName</asp:ListItem>
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtUsersQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchUsers" runat="server" SkinID="SearchButton" OnClick="btnSearchUsers_Click" CausesValidation="false" style="vertical-align: middle;" />
</asp:Panel>
</asp:View>
<asp:View ID="tabSearchSpaces" runat="server">
<asp:Panel ID="pnlSearchSpaces" runat="server" DefaultButton="btnSearchSpaces">
<asp:DropDownList ID="ddlItemType" runat="server" Width="150px" CssClass="NormalTextBox" style="vertical-align: middle;">
</asp:DropDownList><asp:TextBox ID="txtSpacesQuery" runat="server" CssClass="NormalTextBox" Width="120px" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="btnSearchSpaces" runat="server" SkinID="SearchButton" OnClick="btnSearchSpaces_Click" CausesValidation="false" style="vertical-align: middle;" />
</asp:Panel>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left" class="SearchQuery">
<div class="ui-widget">
<asp:TextBox
ID="tbSearch"
runat="server"
CssClass="NormalTextBox"
Width="120px"
style="vertical-align: middle; z-index: 100;"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchColumnType"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchFullType"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchText"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton
ID="ImageButton1"
runat="server"
SkinID="SearchButton"
OnClick="btnSearchObject_Click"
CausesValidation="false"
style="vertical-align: middle;"
/>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>

View file

@ -70,32 +70,20 @@ namespace WebsitePanel.Portal.SkinControls
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
ClientScriptManager cs = Page.ClientScript;
cs.RegisterClientScriptInclude("jquery",ResolveUrl("~/JavaScript/jquery-1.4.4.min.js"));
cs.RegisterClientScriptInclude("jqueryui",ResolveUrl("~/JavaScript/jquery-ui-1.8.9.min.js"));
// cs.RegisterClientScriptBlock(this.GetType(), "jquerycss",
// "<link rel='stylesheet' type='text/css' href='" + ResolveUrl("~/App_Themes/Default/Styles/jquery-ui-1.8.9.css") + "' />");
if (!IsPostBack)
{
BindTabs();
BindItemTypes();
}
}
private void BindTabs()
{
List<Tab> tabsList = new List<Tab>();
if (PanelSecurity.EffectiveUser.Role != UserRole.User)
tabsList.Add(new Tab(0, GetLocalizedString("Users.Text")));
tabsList.Add(new Tab(1, GetLocalizedString("Spaces.Text")));
if(dlTabs.SelectedIndex == -1)
dlTabs.SelectedIndex = 0;
dlTabs.DataSource = tabsList.ToArray();
dlTabs.DataBind();
tabs.ActiveViewIndex = tabsList[dlTabs.SelectedIndex].Index;
}
private void BindItemTypes()
{
// bind item types
/* // bind item types
DataTable dtItemTypes = ES.Services.Packages.GetSearchableServiceItemTypes().Tables[0];
foreach (DataRow dr in dtItemTypes.Rows)
{
@ -108,28 +96,63 @@ namespace WebsitePanel.Portal.SkinControls
}
//
ddlItemType.Items.Add(new ListItem(localizedStr, dr["ItemTypeID"].ToString()));
}
}
protected void dlTabs_SelectedIndexChanged(object sender, EventArgs e)
{
BindTabs();
} */
}
protected void btnSearchUsers_Click(object sender, EventArgs e)
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
/* Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(txtUsersQuery.Text),
"Criteria=" + ddlUserFields.SelectedValue));
"Criteria=" + ddlUserFields.SelectedValue)); */
}
protected void btnSearchSpaces_Click(object sender, EventArgs e)
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
/* Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(txtSpacesQuery.Text),
"ItemTypeID=" + ddlItemType.SelectedValue));
"ItemTypeID=" + ddlItemType.SelectedValue)); */
}
//TODO START
protected void btnSearchObject_Click(object sender, EventArgs e)
{
String strColumnType = tbSearchColumnType.Text;
String strFullType = tbSearchFullType.Text;
String strText = tbSearchText.Text;
if (strText.Length > 0)
{
if (strFullType == "Users")
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetUsersSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText),
"Criteria=" + Server.UrlEncode(strColumnType)
));
}
else if (strFullType == "Space")
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetSpacesSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText),
"Criteria=" + Server.UrlEncode(strColumnType)
));
}
else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(strText)));
}
}
else
{
Response.Redirect(PortalUtils.NavigatePageURL(PortalUtils.GetObjectSearchPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"Query=" + Server.UrlEncode(tbSearch.Text)));
}
}
//TODO END
}
}

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -50,111 +22,48 @@ namespace WebsitePanel.Portal.SkinControls {
protected global::System.Web.UI.UpdatePanel updatePanelUsers;
/// <summary>
/// dlTabs control.
/// tbSearch 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.DataList dlTabs;
protected global::System.Web.UI.WebControls.TextBox tbSearch;
/// <summary>
/// tabs control.
/// tbSearchColumnType 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.MultiView tabs;
protected global::System.Web.UI.WebControls.TextBox tbSearchColumnType;
/// <summary>
/// tabSearchUsers control.
/// tbSearchFullType 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.View tabSearchUsers;
protected global::System.Web.UI.WebControls.TextBox tbSearchFullType;
/// <summary>
/// pnlSearchUsers control.
/// tbSearchText 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.Panel pnlSearchUsers;
protected global::System.Web.UI.WebControls.TextBox tbSearchText;
/// <summary>
/// ddlUserFields control.
/// ImageButton1 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 ddlUserFields;
/// <summary>
/// txtUsersQuery 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 txtUsersQuery;
/// <summary>
/// btnSearchUsers 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.ImageButton btnSearchUsers;
/// <summary>
/// tabSearchSpaces 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.View tabSearchSpaces;
/// <summary>
/// pnlSearchSpaces 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.Panel pnlSearchSpaces;
/// <summary>
/// ddlItemType 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 ddlItemType;
/// <summary>
/// txtSpacesQuery 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 txtSpacesQuery;
/// <summary>
/// btnSearchSpaces 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.ImageButton btnSearchSpaces;
protected global::System.Web.UI.WebControls.ImageButton ImageButton1;
}
}

View file

@ -98,6 +98,24 @@
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel ID="TwilioSettings" runat="server" TargetControlID="PanelTwilioSettings" meta:resourcekey="TwilioSettings" Text="Webdav Portal" />
<asp:Panel ID="PanelTwilioSettings" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblAccountSid" runat="server" meta:resourcekey="lblAccountSid" />
<td><asp:TextBox runat="server" ID="txtAccountSid" Width="450px" /></td>
</tr>
<tr>
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblAuthToken" runat="server" meta:resourcekey="lblAuthToken" />
<td><asp:TextBox runat="server" ID="txtAuthToken" Width="450px" /></td>
</tr>
<tr>
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblPhoneFrom" runat="server" meta:resourcekey="lblPhoneFrom" />
<td><asp:TextBox runat="server" ID="txtPhoneFrom" Width="450px" /></td>
</tr>
</table>
</asp:Panel>
</div>
<div class="FormFooter">
<asp:Button runat="server" ID="btnSaveSettings" meta:resourcekey="btnSaveSettings"

View file

@ -167,6 +167,17 @@ namespace WebsitePanel.Portal
chkEnablePasswordReset.Checked = Utils.ParseBool(settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
txtWebdavPortalUrl.Text = settings[WEBDAV_PORTAL_URL];
}
// Twilio portal
settings = ES.Services.System.GetSystemSettings(WSP.SystemSettings.TWILIO_SETTINGS);
if (settings != null)
{
txtAccountSid.Text = settings.GetValueOrDefault(WSP.SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty);
txtAuthToken.Text = settings.GetValueOrDefault(WSP.SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty);
txtPhoneFrom.Text = settings.GetValueOrDefault(WSP.SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty);
}
}
private void SaveSettings()
@ -253,6 +264,19 @@ namespace WebsitePanel.Portal
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY] = chkEnablePasswordReset.Checked.ToString();
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WEBDAV_PORTAL_SETTINGS, settings);
if (result < 0)
{
ShowResultMessage(result);
return;
}
// Twilio portal
settings = new WSP.SystemSettings();
settings[WSP.SystemSettings.TWILIO_ACCOUNTSID_KEY] = txtAccountSid.Text;
settings[WSP.SystemSettings.TWILIO_AUTHTOKEN_KEY] = txtAuthToken.Text;
settings[WSP.SystemSettings.TWILIO_PHONEFROM_KEY] = txtPhoneFrom.Text;
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.TWILIO_SETTINGS, settings);
if (result < 0)
{
ShowResultMessage(result);

View file

@ -282,6 +282,78 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtWebdavPortalUrl;
/// <summary>
/// TwilioSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel TwilioSettings;
/// <summary>
/// PanelTwilioSettings 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.Panel PanelTwilioSettings;
/// <summary>
/// lblAccountSid 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.Localize lblAccountSid;
/// <summary>
/// txtAccountSid 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 txtAccountSid;
/// <summary>
/// lblAuthToken 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.Localize lblAuthToken;
/// <summary>
/// txtAuthToken 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 txtAuthToken;
/// <summary>
/// lblPhoneFrom 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.Localize lblPhoneFrom;
/// <summary>
/// txtPhoneFrom 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 txtPhoneFrom;
/// <summary>
/// btnSaveSettings control.
/// </summary>

View file

@ -210,4 +210,13 @@
<data name="valResetAccountLockout.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="lblMaxPasswordAge.Text" xml:space="preserve">
<value>Max Password Age (days):</value>
</data>
<data name="valCorrectMaxPasswordAge.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="valRequireMaxPasswordAge.Text" xml:space="preserve">
<value>*</value>
</data>
</root>

View file

@ -37,6 +37,16 @@
<asp:RegularExpressionValidator ID="valCorrectEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valCorrectEnforcePasswordHistory"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="Normal" style="width:150px;"><asp:Label ID="lblMaxPasswordAge" runat="server"
meta:resourcekey="lblMaxPasswordAge" Text="Max Password Age (days):"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtMaxPasswordAge" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valRequireMaxPasswordAge"
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valCorrectMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valCorrectMaxPasswordAge"
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
</tr>
<tr id="RowChkLockOutSettigns" runat="server">
<td colspan="2" class="NormalBold">
<asp:CheckBox id="chkLockOutSettigns" runat="server" meta:resourcekey="chkLockOutSettigns"

View file

@ -64,6 +64,8 @@ namespace WebsitePanel.Portal
sb.Append(chkLockOutSettigns.Checked.ToString()).Append(";");
sb.Append(chkPasswordComplexity.Checked.ToString()).Append(";");
sb.Append(txtMaxPasswordAge.Text).Append(";");
return sb.ToString();
}
set
@ -79,6 +81,7 @@ namespace WebsitePanel.Portal
txtMinimumSymbols.Text = "0";
txtLockedOut.Text = "3";
chkPasswordComplexity.Checked = true;
txtMaxPasswordAge.Text = "42";
}
else
{
@ -100,6 +103,8 @@ namespace WebsitePanel.Portal
txtResetAccountLockout.Text = GetValueSafe(parts, 10, "0");
chkLockOutSettigns.Checked = GetValueSafe(parts, 11, false) && ShowLockoutSettings;
chkPasswordComplexity.Checked = GetValueSafe(parts, 12, true);
txtMaxPasswordAge.Text = GetValueSafe(parts, 13, "42");
}
catch
{
@ -155,15 +160,19 @@ namespace WebsitePanel.Portal
public static T GetValueSafe<T>(string[] array, int index, T defaultValue)
{
if (array.Length > index)
try
{
if (string.IsNullOrEmpty(array[index]))
if (array.Length > index)
{
return defaultValue;
}
if (string.IsNullOrEmpty(array[index]))
{
return defaultValue;
}
return (T)Convert.ChangeType(array[index], typeof(T));
return (T)Convert.ChangeType(array[index], typeof(T));
}
}
catch{}
return defaultValue;
}

View file

@ -147,6 +147,42 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
/// <summary>
/// lblMaxPasswordAge 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 lblMaxPasswordAge;
/// <summary>
/// txtMaxPasswordAge 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 txtMaxPasswordAge;
/// <summary>
/// valRequireMaxPasswordAge 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 valRequireMaxPasswordAge;
/// <summary>
/// valCorrectMaxPasswordAge 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 valCorrectMaxPasswordAge;
/// <summary>
/// RowChkLockOutSettigns control.
/// </summary>

View file

@ -1,7 +1,95 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchBox.ascx.cs" Inherits="WebsitePanel.Portal.SearchBox" %>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$("#tbSearch").keypress(function () {
$("#tbSearchText").val('');
});
$("#tbSearch").autocomplete({
zIndex: 100,
source: function (request, response) {
$.ajax({
type: "post",
dataType: "json",
data: {
term: request.term,
fullType: '',
columnType: "'" + $("#ddlFilterColumn").val() + "'"
},
url: "AjaxHandler.ashx",
success: function (data) {
response($.map(data, function (item) {
return {
label: item.TextSearch,
code: item
};
}));
}
})
},
select: function (event, ui) {
var item = ui.item;
$("#ddlFilterColumn").val(item.code.ColumnType);
$("#tbSearchFullType").val(item.code.FullType);
$("#tbSearchText").val(item.code.TextSearch);
}
});
});//]]>
</script>
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
<asp:Label ID="lblSearch" runat="server" meta:resourcekey="lblSearch" Visible="false"></asp:Label>
<asp:DropDownList ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" style="vertical-align: middle;">
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
CausesValidation="false" style="vertical-align: middle;"/>
</asp:Panel>
<table>
<tr>
<td>
<asp:DropDownList ClientIDMode="Static" ID="ddlFilterColumn" runat="server" CssClass="NormalTextBox" resourcekey="ddlFilterColumn">
</asp:DropDownList>
</td>
<td>
<table cellpadding="0" cellspacing="0" align="right">
<tr>
<td align="left" class="SearchQuery">
<div class="ui-widget">
<asp:TextBox
ID="tbSearch"
ClientIDMode="Static"
runat="server"
CssClass="NormalTextBox"
Width="120px"
style="vertical-align: middle; z-index: 100;"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchFullType"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:TextBox
ID="tbSearchText"
ClientIDMode="Static"
runat="server"
type="hidden"
>
</asp:TextBox>
<asp:ImageButton
ID="cmdSearch"
runat="server"
SkinID="SearchButton"
CausesValidation="false"
OnClick="cmdSearch_Click"
style="vertical-align: middle;"
/>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>

View file

@ -60,13 +60,23 @@ namespace WebsitePanel.Portal
{
get
{
string val = txtFilterValue.Text.Trim();
string val = tbSearchText.Text.Trim();
string valText = tbSearch.Text.Trim();
if (valText.Length == 0)
val = valText;
if (val.Length == 0)
val = tbSearch.Text.Trim();
val = val.Replace("%", "");
return "%" + val + "%";
}
set
{
txtFilterValue.Text = value;
if (value != null)
{
value = value.Replace("%", "");
tbSearch.Text = value;
tbSearchText.Text = value;
}
}
}
@ -83,7 +93,15 @@ namespace WebsitePanel.Portal
public override void Focus()
{
base.Focus();
txtFilterValue.Focus();
tbSearch.Focus();
}
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect(NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"FilterColumn=" + ddlFilterColumn.SelectedValue,
"FilterValue=" + Server.UrlEncode(FilterValue)));
}
}
}

View file

@ -1,38 +1,9 @@
// Copyright (c) 2015, 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.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -69,13 +40,31 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.WebControls.DropDownList ddlFilterColumn;
/// <summary>
/// txtFilterValue control.
/// tbSearch 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 txtFilterValue;
protected global::System.Web.UI.WebControls.TextBox tbSearch;
/// <summary>
/// tbSearchFullType 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 tbSearchFullType;
/// <summary>
/// tbSearchText 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 tbSearchText;
/// <summary>
/// cmdSearch control.

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -1,5 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserCustomersSummary.ascx.cs" Inherits="WebsitePanel.Portal.UserCustomersSummary" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="UserControls/SearchBox.ascx" TagName="SearchBox" TagPrefix="uc1" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<div class="FormButtonsBar">
<div class="Left">
@ -7,14 +9,8 @@
runat="server" CssClass="Button1"></asp:Button>
</div>
<div class="Right">
<asp:Panel ID="tblSearch" runat="server" DefaultButton="cmdSearch" CssClass="NormalBold">
<asp:DropDownList ID="ddlFilterColumn" runat="server" resourcekey="ddlFilterColumn" CssClass="NormalTextBox" style="vertical-align: middle;">
<asp:ListItem Value="Username">Username</asp:ListItem>
<asp:ListItem Value="Email">E-mail</asp:ListItem>
<asp:ListItem Value="FullName">FullName</asp:ListItem>
<asp:ListItem Value="CompanyName">CompanyName</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtFilterValue" runat="server" CssClass="NormalTextBox" Width="100" style="vertical-align: middle;"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
CausesValidation="false" OnClick="cmdSearch_Click" style="vertical-align: middle;"/>
<asp:Panel ID="tblSearch" runat="server" CssClass="NormalBold">
<uc1:SearchBox ID="searchBox" runat="server" />
</asp:Panel>
</div>
</div>

View file

@ -46,7 +46,13 @@ namespace WebsitePanel.Portal
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString());
if (!IsPostBack)
txtFilterValue.Focus();
{
searchBox.AddCriteria("Username", GetLocalizedString("SearchField.Username"));
searchBox.AddCriteria("FullName", GetLocalizedString("SearchField.Name"));
searchBox.AddCriteria("Email", GetLocalizedString("SearchField.EMail"));
searchBox.AddCriteria("CompanyName", GetLocalizedString("SearchField.CompanyName"));
searchBox.Focus();
}
}
private void BindGroupings()
@ -73,14 +79,6 @@ namespace WebsitePanel.Portal
parameterName + "=" + parameterValue);
}
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect(NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(),
"FilterColumn=" + ddlFilterColumn.SelectedValue,
"FilterValue=" + Server.UrlEncode(txtFilterValue.Text)));
}
protected void btnCreate_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl(PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString(), "create_user"));

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
@ -59,31 +31,13 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.WebControls.Panel tblSearch;
/// <summary>
/// ddlFilterColumn control.
/// searchBox 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 ddlFilterColumn;
/// <summary>
/// txtFilterValue 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 txtFilterValue;
/// <summary>
/// cmdSearch 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.ImageButton cmdSearch;
protected global::WebsitePanel.Portal.SearchBox searchBox;
/// <summary>
/// allCustomers control.

View file

@ -5,7 +5,6 @@
<%@ Register Src="UserOrganization.ascx" TagName="UserOrganization" TagPrefix="wsp" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<script src="/JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="/JavaScript/chosen.min.js" type="text/javascript"></script>
<script type="text/javascript">

View file

@ -53,7 +53,8 @@ namespace WebsitePanel.Portal
protected void Page_Load(object sender, EventArgs e)
{
ClientScriptManager cs = Page.ClientScript;
cs.RegisterClientScriptInclude("jquery", ResolveUrl("~/JavaScript/jquery-1.4.4.min.js"));
// check for user
bool isUser = PanelSecurity.SelectedUser.Role == UserRole.User;

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.

View file

@ -153,6 +153,7 @@
<Compile Include="Code\Framework\ISchedulerTaskView.cs" />
<Compile Include="Code\Framework\WebPortalPageTitleProvider.cs" />
<Compile Include="Code\Framework\WebPortalThemeProvider.cs" />
<Compile Include="Code\Helpers\AjaxHandler.cs" />
<Compile Include="Code\Helpers\AppInstallerHelpers.cs" />
<Compile Include="Code\Framework\WebsitePanelControlBase.cs">
<SubType>ASPXCodeBehind</SubType>
@ -352,6 +353,13 @@
<DependentUpon>UserPasswordExpirationNotificationView.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SearchObject.ascx.cs">
<DependentUpon>SearchObject.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SearchObject.ascx.designer.cs">
<DependentUpon>SearchObject.ascx</DependentUpon>
</Compile>
<Compile Include="VPS2012\RemoteDesktop\Connect.aspx.cs">
<DependentUpon>Connect.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4891,7 +4899,9 @@
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx" />
<Content Include="VpsMenu.ascx" />
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
<Content Include="SearchObject.ascx" />
<Content Include="ScheduleTaskControls\UserPasswordExpirationNotificationView.ascx" />
<Content Include="SearchObject.ascx" />
<Content Include="SettingsUserPasswordExpirationLetter.ascx" />
<Content Include="SettingsUserPasswordResetLetter.ascx" />
<Content Include="VPS2012\RemoteDesktop\Connect.aspx" />
@ -5209,6 +5219,7 @@
</Content>
<Content Include="UserControls\App_LocalResources\MailAccountActions.ascx.resx" />
<Content Include="ScheduleTaskControls\App_LocalResources\UserPasswordExpirationNotificationView.ascx.resx" />
<Content Include="SkinControls\App_LocalResources\SearchObject.ascx.resx" />
<EmbeddedResource Include="UserControls\App_LocalResources\WebsiteActions.ascx.resx" />
<Content Include="VPS\UserControls\App_LocalResources\Generation.ascx.resx">
<SubType>Designer</SubType>