}
promptInterval = new TermsOfServicePromptIntervalFormElement(promptVal, "tosPromptInterval");
form.addFormElement(new UserAssociationFormElement(systemSettingValues));
BasicCheckBoxFormElement sendEmails = new BasicCheckBoxFormElement("", "sendWelcomeEmails",
"Send email invitations to new users as their accounts are created.", false,
systemSettingValues.getSendWelcomeEmails());
sendEmails.addStyleName(StaticResourceBundle.INSTANCE.coreCss().welcomeEmailCheckbox());
membershipRefreshButton = initializeRefreshButton();
FlowPanel clearPanel = new FlowPanel();
clearPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().clear());
sendEmails.add(membershipRefreshButton);
form.addFormElement(sendEmails);
form.addFormDivider();
form.addWidget(new SendNotificationWidget());
form.addFormDivider();
form.addFormElement(hideableSiteLabel);
form.addFormDivider();
form.addFormElement(hideableContentWarning);
form.addFormDivider();
form.addFormElement(hideablePluginWarning);
form.addFormDivider();
form.addFormElement(tosElement);
form.addFormElement(promptInterval);
form.addFormDivider();
// Help Page
form.addFormElement(new BasicTextBoxFormElement(MAX_GROUP_NAME, false, "Support Stream",
"supportStreamGroupShortName", systemSettingValues.getSupportStreamGroupShortName(),
"Enter the name of the stream you want to display on the help page", false));
form.addFormDivider();
form.addFormElement(activityExp);
form.addFormDivider();
BasicCheckBoxFormElement groupCreationPolicy = new BasicCheckBoxFormElement("New Group Moderation",
"allUsersCanCreateGroups", "Enable Moderation.",
"By enabling moderation, system administrators will be required to review new group requests. "
+ "Groups pending approval will be listed under the pending tab of system settings.", false,
!systemSettingValues.getAllUsersCanCreateGroups());
// The key is true for "allowing group creation" and the checkbox displays "allowing moderation". Since
// these are opposites, the value needs to be reversed when the form gets submitted.
groupCreationPolicy.setReverseValue(true);
form.addFormElement(groupCreationPolicy);
form.addFormDivider();
if (!tosElement.isChecked())