Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sharepoint remove "Send welcome e-mail to the new users" checkbox when adding a new user to a group

Posted on 2013-05-13
4
Medium Priority
?
847 Views
Last Modified: 2013-05-18
How do I remove "Send welcome e-mail to the new users" checkbox when adding a new user to a group in SharePoint.
0
Comment
Question by:jackjohnson44
  • 2
4 Comments
 
LVL 9

Expert Comment

by:skipper68
ID: 39162886
The page that controls this is in Layouts folder under the 12 Hive (as it is known by SharePoint admins). The page name is aclinv.aspx. I recommend creating a copy of the file before making any changes for backup purposes. You will need to modify just one line inside it.Starting at line 190 look for the following code:
<wssawc:InputFormCheckBox
     runat=”server”    
     id=”chkSendEmail”
     Checked=”True”
     LabelText=”<%$Resources:wss,aclver_SendEmailCheckbox%>”
     ToggleChildren=true>
     ……
Now all we need to change is the line: Checked=”True” to Checked=”False”.
Note: If you have multiple Web Front End Servers make sure that you change the file on all of them.
0
 

Author Comment

by:jackjohnson44
ID: 39162958
I don't want the checkbox unchecked, I want the whole section removed.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39163110
Hi,
I really hate what MS has done here as there is no general setting for that. And modifying OOTB pages for SharePoint is no good idea because you have to remember that on every service pack/cumulative update installation.
As this page and the event afterwards are built-in into SP, you will have to set the value (checked) to false and change the visibility to be hidden (visible = false).
Remove the title of the inputform section and set visible=false to all child controls in this formsection.
HTH
Rainer
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 total points
ID: 39165336
Hi,
here the modified file. You just would have to replace the path to your jQuery library:
<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.ApplicationPages.AclInv"       %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<!-- // EE-Added RainerJ -->
<script language="JavaScript" type="text/javascript" src="/_layouts/RainerJScripts/jquery-1.9.1.min.js"></script>
<script language="JavaScript" type="text/javascript">
function HideEmailRow()
{
	jQuery("tr#ctl00_PlaceHolderMain_ifsSendEmail").hide();
}
</script>

<SCRIPT language="JavaScript">
function ULSF6s(){var o=new Object;o.ULSTeamName="Microsoft SharePoint Foundation";o.ULSFileName="AclInv.aspx";return o;}
var subjectChanged = false;
var rolesCblShown = false;
function UpdateEmailSubject()
{ULSF6s:;
	if(subjectChanged)
		return;
	try
	{
		var objEmailSubject = (document.getElementById("<%= txtEmailSubject.ClientID %>"));
		if (objEmailSubject != null)
		{
			var addToGroup = (document.getElementById("<%= RadAddToGroup.ClientID %>")).checked;
			if (addToGroup)
			{
				var groupCombo = (document.getElementById("<%= DdlGroup.ClientID %>"));
				objEmailSubject.value = AddToGroupEmailSubjectLines[groupCombo.selectedIndex];
			}
			else
			{
				objEmailSubject.value = AddToRoleEmailSubjectLines[0];
			}
		}
	}
	catch(e)
	{
	}
}
function OnSubjectChanged()
{ULSF6s:;
	subjectChanged = true;
}
function _spBodyOnLoad()
{ULSF6s:;
	SetAddToGroupOrRoleStatus();
	// EE-Added RainerJ
	HideEmailRow();
}
function SetAddToGroupOrRoleStatus()
{ULSF6s:;
	var eleGroupInputSection = (document.getElementById("<%= IfsGivePermissions.ClientID %>"));
	if (eleGroupInputSection == null)
		return;
	var addToGroup = (document.getElementById("<%= RadAddToGroup.ClientID %>")).checked;
	var children = document.getElementById("<%= RadAddToGroup.ClientID %>" + "_child");
	if (children != null)
		SetChildControlsDisabledStatus(children , !addToGroup );
	children = document.getElementById("<%= RadAddToRole.ClientID %>" + "_child");
	if (children != null)
		SetChildControlsDisabledStatus(children, addToGroup );
	UpdateRolesCbl();
	UpdateEmailSubject();
}
function UpdateRolesCbl()
{ULSF6s:;
	var rolesDiv = document.getElementById("divRoles");
	var addToRoleChecked = false;
	if (rolesDiv == null)
		return;
	var addToRole = (document.getElementById("<%= RadAddToRole.ClientID %>"));
	if (addToRole != null)
		addToRoleChecked = addToRole.checked;
	else
		return;
	var valCblRolesElement = (document.getElementById("<%= ValCblRoles.ClientID %>"));
	if (addToRoleChecked)
	{
		rolesDiv.style.display= "block";
	}
	else
	{
		rolesDiv.style.display= "none";
		if (valCblRolesElement != null)
		{
			valCblRolesElement.style.visibility = "hidden";
		}
	}
}
function GotoGroupSecScopes(link)
{ULSF6s:;
	var ddlGroup = (document.getElementById("<%= DdlGroup.ClientID %>"));
	if (ddlGroup != null)
	{
		if (ddlGroup.value != "")
		{
			var url = "ViewGroupPermissions.aspx?ID=" + escapeProperly(ddlGroup.value);
			var feature;
			if(window.showModalDialog && !browseris.safari125up)
				feature = "resizable:yes;status:no;scroll:no;help:no;center:yes;dialogWidth:525pt;dialogHeight:400pt;";
			else
				feature = "resizable=yes,status=no,scrollbars=no,menubar=no,directories=no,location=no,width=650,height=500";
			commonShowModalDialog(url, feature);
			return true;
		}
	}
	return false;
}
</SCRIPT>
</asp:Content>
<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:content contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server">
	<a href="settings.aspx"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,settings_pagetitle%>" EncodeMethod="HtmlEncode"/></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow runat="server" /> <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<asp:Label id="Label_Aclinv_PageDesc" runat="server" Visible="True"
		Text="<%$Resources:wss,aclinv_pagedescription%>" />
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<table border="0" cellspacing="0" cellpadding="0" class="ms-propertysheet">
	<wssuc:InputFormSection Title="<%$Resources:wss,aclinv_Step1Title%>"
		Description="<%$Resources:wss,aclinv_DescGrantIndiv%>"
		runat="server">
		<Template_Description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_DescGrantIndiv%>" EncodeMethod='HtmlEncode'/>
			<br/>
			<br/>
		</Template_Description>
		<Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:wss,aclinv_UserGroupsLabel%>" runat="server">
				<Template_Control>
					<wssawc:PeopleEditor
								AllowEmpty=false
								ValidatorEnabled="true"
								id="userPicker"
								runat="server"
								ShowCreateButtonInActiveDirectoryAccountCreationMode=true
								SelectionSet="User,SecGroup,SPGroup"
								/>
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<wssuc:InputFormSection
		Title="<%$Resources:wss,aclinv_Step2Title1%>"
		Description="<%$Resources:wss,aclinv_DescChoosePerms%>"
		runat="server"
		id = "IfsGivePermissions">
		<Template_InputFormControls>
			<wssuc:InputFormControl runat="server" LabelText="<%$Resources:wss,aclinv_PermsLabel%>">
				<Template_Control>
					<table class="ms-authoringcontrols" border="0" cellpadding="0" cellspacing="0" width="100%">
						<wssawc:InputFormRadioButton runat="server"
							Id="RadAddToGroup"
							LabelText="<%$Resources:wss,aclinv_addusertogroup%>"
							GroupName="AddToGroupOrRole"
							Checked="true"
							onclick="SetAddToGroupOrRoleStatus()"
							>
							<asp:DropDownList
								id="DdlGroup"
								runat="server"
								ToolTip="<%$Resources:wss,aclinv_DdlGroupToolTip%>"
								onchange="UpdateEmailSubject()"/>
							<wssawc:InputFormRequiredFieldValidator runat="server"
								id="ReqValGroup"
								ControlToValidate="DdlGroup"
								EnableClientScript ="false"
								/>
							<wssawc:InputFormCustomValidator runat="server"
								id="CusValGroup"
								ControlToValidate="DdlGroup"
								EnableClientScript ="false"
								OnServerValidate = "CusValGroup_ServerValidate"
								ErrorMessage="<%$Resources:wss,aclinv_cannoteditmembership%>"
								/>
							<asp:PlaceHolder id="PanelViewGroupPerm" runat="server">
							<br/><a id="LnkViewGroupPerm" href="javascript:" onclick="GotoGroupSecScopes(this);return false;"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_viewgroupperm%>" EncodeMethod='HtmlEncode'/></a>
							</asp:PlaceHolder>
						</wssawc:InputFormRadioButton>
						<wssawc:InputFormRadioButton runat="server"
							Id="RadAddToRole"
							LabelText="<%$Resources:wss,aclinv_addusertopermlevel%>"
							GroupName="AddToGroupOrRole"
							onclick="SetAddToGroupOrRoleStatus()"
							>
							<asp:PlaceHolder id="PanelCannotAddUserToRoleInheritedPerm" runat="server" Visible="false">
							<% if (Web.UIVersion > 3) { %>
									<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_inheritperm_msgv4%>" EncodeMethod='HtmlEncode'/>
							<% } else {%>
								<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_inheritperm_msg%>" EncodeMethod='HtmlEncode'/>
							<% } %>
							</asp:PlaceHolder>
							<asp:PlaceHolder id="PanelCannotAddUserToRoleNoPerm" runat="server" Visible="false">
								<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_adduserdirectly_noperm%>" EncodeMethod='HtmlEncode'/>
							</asp:PlaceHolder>
							<div id="divRoles">
							<wssawc:InputFormCheckBoxList
										id="cblRoles"
										runat="server"
										class="ms-authoringcontrols"/>
							<wssawc:InputFormCheckBoxListValidator
										id="ValCblRoles"
										ControlToValidate="cblRoles"
										DisplayMode="Static"
										ErrorMessage="<%$Resources:wss,aclinv_NoPermission_ERR%>"
										runat="server" />
							 </div>
							<asp:PlaceHolder id="PanelPictureLibraryNote" visible="false" runat="server">
								<br/><br/>
								<span class="ms-alerttext"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_PicLibNoteLabel%>" EncodeMethod='HtmlEncode'/></span>
								<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_PicLibNote%>" EncodeMethod='HtmlEncode'/>
							</asp:PlaceHolder>
						</wssawc:InputFormRadioButton>
					</table>
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<wssuc:InputFormSection
		Title=""
		runat="server"
		id=ifsSendEmail
		visible="False">
		<Template_Description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclver_DescSendEmail%>" EncodeMethod='HtmlEncode' />
			<br/><br/>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclver_DescSendEmail2%>" EncodeMethod='HtmlEncode' />
		</Template_Description>
		<Template_InputFormControls>
			  <wssawc:InputFormCheckBox
				  runat="server"
				  id="chkSendEmail"
				  Checked="False"
				  Visible="False"
				  LabelText="<%$Resources:wss,aclver_SendEmailCheckbox%>"
				  ToggleChildren=true>
						<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclver_SubjectLabel%>" EncodeMethod='HtmlEncode'/>
						<br/>
						<wssawc:InputFormTextBox title="<%$Resources:wss,aclver_SubjectTitle%>" class="ms-long" ID="txtEmailSubject" Columns="35" Runat="server" MaxLength=512 OnChange="OnSubjectChanged()" />
						<wssawc:InputFormRequiredFieldValidator id="ReqValEmailSubject" runat="server"
							BreakBefore=true BreakAfter=true
							EnableClientScript ="false"
							ControlToValidate="txtEmailSubject"/>
						<br/>
						<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclver_BodyLabel%>" EncodeMethod='HtmlEncode'/>
						<br/>
						<wssawc:InputFormTextBox title="<%$Resources:wss,aclver_BodyTitle%>" class="ms-long" ID="txtEmailBody" Runat="server" TextMode="MultiLine" Columns="40" Rows="8" Cols=64 MaxLength=2000 />
			  </wssawc:InputFormCheckBox>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<wssuc:ButtonSection runat="server">
		<Template_Buttons>
			<asp:PlaceHolder runat="server">
				<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnOK_Click" Text="<%$Resources:wss,multipages_okbutton_text%>" id="btnOK" accesskey="<%$Resources:wss,okbutton_accesskey%>"/>
			</asp:PlaceHolder>
		</Template_Buttons>
	</wssuc:ButtonSection>
</table>
</asp:Content>
<%@ Register TagPrefix="wssuc" TagName="TopNavBar" src="~/_controltemplates/TopNavBar.ascx" %>
<asp:Content contentplaceholderid="PlaceHolderTopNavBar" runat="server">
  <wssuc:TopNavBar id="IdTopNavBar" runat="server" Version="4" ShouldUseExtra="true"/>
</asp:Content>
<asp:Content contentplaceholderid="PlaceHolderHorizontalNav" runat="server"/>
<asp:Content contentplaceholderid="PlaceHolderSearchArea" runat="server"/>
<asp:Content contentplaceholderid="PlaceHolderTitleBreadcrumb" runat="server">
  <SharePoint:UIVersionedContent UIVersion="3" runat="server"><ContentTemplate>
	<asp:SiteMapPath
		SiteMapProvider="SPXmlContentMapProvider"
		id="ContentMap"
		SkipLinkText=""
		NodeStyle-CssClass="ms-sitemapdirectional"
		RootNodeStyle-CssClass="s4-die"
		PathSeparator="&#160;&gt; "
		PathSeparatorStyle-CssClass = "s4-bcsep"
		runat="server" />
  </ContentTemplate></SharePoint:UIVersionedContent>
  <SharePoint:UIVersionedContent UIVersion="4" runat="server"><ContentTemplate>
	<SharePoint:ListSiteMapPath
		runat="server"
		SiteMapProviders="SPSiteMapProvider,SPXmlContentMapProvider"
		RenderCurrentNodeAsLink="false"
		PathSeparator=""
		CssClass="s4-breadcrumb"
		NodeStyle-CssClass="s4-breadcrumbNode"
		CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
		RootNodeStyle-CssClass="s4-breadcrumbRootNode"
		HideInteriorRootNodes="true"
		SkipLinkText="" />
  </ContentTemplate></SharePoint:UIVersionedContent>
</asp:Content>

Open in new window

HTH
Rainer
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question