Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions _inc/client/security/antispam.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import TextInput from 'components/text-input';

/**
* Internal dependencies
*/
import { FormFieldset } from 'components/forms';
import { ModuleToggle } from 'components/module-toggle';
import { ModuleSettingsForm as moduleSettingsForm } from 'components/module-settings/module-settings-form';
import { ModuleSettingCheckbox } from 'components/module-settings/form-components';
import SettingsCard from 'components/settings-card';
Expand All @@ -27,7 +24,7 @@ export const Antispam = moduleSettingsForm(
return (
<SettingsCard
{ ...this.props }
header={ __( 'Antispam', { context: 'Settings header' } ) }>
header={ __( 'Spam Filtering', { context: 'Settings header' } ) }>
<SettingsGroup support="https://akismet.com/jetpack/">
<FormFieldset>
<ModuleSettingCheckbox
Expand Down
3 changes: 1 addition & 2 deletions _inc/client/security/backups-scan.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';

Expand All @@ -24,7 +23,7 @@ export const BackupsScan = moduleSettingsForm(
return (
<SettingsCard
{ ...this.props }
header={ __( 'Backups and security scanning', { context: 'Settings header' } ) }
header={ __( 'Backups and Security Scanning', { context: 'Settings header' } ) }
hideButton>
<SettingsGroup support="https://vaultpress.com/jetpack/">
<p>
Expand Down
14 changes: 6 additions & 8 deletions _inc/client/security/protect.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import Button from 'components/button';
import Textarea from 'components/textarea';
import includes from 'lodash/includes';
import ExternalLink from 'components/external-link';

/**
* Internal dependencies
Expand Down Expand Up @@ -69,13 +67,13 @@ export const Protect = moduleSettingsForm(
<SettingsCard
{ ...this.props }
module="protect"
header={ __( 'Brute force protection', { context: 'Settings header' } ) } >
header={ __( 'Brute Force Protection', { context: 'Settings header' } ) } >
<SettingsGroup hasChild support={ this.props.getModule( 'protect' ).learn_more_button }>
<ModuleToggle slug="protect"
compact
activated={ isProtectActive }
toggling={ this.props.isSavingAnyOption( 'protect' ) }
toggleModule={ this.props.toggleModuleNow }>
compact
activated={ isProtectActive }
toggling={ this.props.isSavingAnyOption( 'protect' ) }
toggleModule={ this.props.toggleModuleNow }>
<span className="jp-form-toggle-explanation">
{
this.props.getModule( 'protect' ).description
Expand Down Expand Up @@ -123,7 +121,7 @@ export const Protect = moduleSettingsForm(
} )
}
</span>
</FormFieldset>
</FormFieldset>
: ''
}
</SettingsGroup>
Expand Down
14 changes: 6 additions & 8 deletions _inc/client/security/sso.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import TextInput from 'components/text-input';

/**
* Internal dependencies
Expand All @@ -25,13 +23,13 @@ export const SSO = moduleSettingsForm(
<SettingsCard
{ ...this.props }
module="sso"
header={ __( 'WordPress.com log in', { context: 'Settings header' } ) }>
header={ __( 'WordPress.com Log In', { context: 'Settings header' } ) }>
<SettingsGroup hasChild support={ this.props.getModule( 'sso' ).learn_more_button }>
<ModuleToggle slug="sso"
compact
activated={ isSSOActive }
toggling={ this.props.isSavingAnyOption( 'sso' ) }
toggleModule={ this.props.toggleModuleNow }>
compact
activated={ isSSOActive }
toggling={ this.props.isSavingAnyOption( 'sso' ) }
toggleModule={ this.props.toggleModuleNow }>
<span className="jp-form-toggle-explanation">
{
this.props.getModule( 'sso' ).description
Expand All @@ -54,7 +52,7 @@ export const SSO = moduleSettingsForm(
name={ 'jetpack_sso_require_two_step' }
{ ...this.props }
label={ __( 'Require two step authentication.' ) } />
</FormFieldset>
</FormFieldset>
: ''
}
</SettingsGroup>
Expand Down
1 change: 0 additions & 1 deletion _inc/client/traffic/seo.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import ExternalLink from 'components/external-link';
Expand Down
23 changes: 10 additions & 13 deletions _inc/client/traffic/site-stats.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';

Expand All @@ -10,13 +9,11 @@ import { translate as __ } from 'i18n-calypso';
*/
import {
FormFieldset,
FormLegend,
FormLabel
FormLegend
} from 'components/forms';
import { ModuleToggle } from 'components/module-toggle';
import { ModuleSettingsForm as moduleSettingsForm } from 'components/module-settings/module-settings-form';
import {
ModuleSettingSelect,
ModuleSettingMultipleSelectCheckboxes
} from 'components/module-settings/form-components';
import SettingsCard from 'components/settings-card';
Expand All @@ -31,26 +28,26 @@ export const SiteStats = moduleSettingsForm(
return (
<SettingsCard
{ ...this.props }
header={ __( 'Site stats' ) }
header={ __( 'Site Stats' ) }
module="stats">
<SettingsGroup support={ stats.learn_more_button }>
<FormFieldset>
<ModuleToggle slug="stats"
compact
activated={ !!this.props.getOptionValue( 'admin_bar' ) }
toggling={ this.props.isSavingAnyOption( [ 'stats', 'admin_bar' ] ) }
toggleModule={ m => this.props.updateFormStateModuleOption( m, 'admin_bar' ) }>
compact
activated={ !!this.props.getOptionValue( 'admin_bar' ) }
toggling={ this.props.isSavingAnyOption( [ 'stats', 'admin_bar' ] ) }
toggleModule={ m => this.props.updateFormStateModuleOption( m, 'admin_bar' ) }>
<span className="jp-form-toggle-explanation">
{
__( 'Put a chart showing 48 hours of views in the admin bar.' )
}
</span>
</ModuleToggle>
<ModuleToggle slug="stats"
compact
activated={ !!this.props.getOptionValue( 'hide_smile' ) }
toggling={ this.props.isSavingAnyOption( [ 'stats', 'hide_smile' ] ) }
toggleModule={ m => this.props.updateFormStateModuleOption( m, 'hide_smile' ) }>
compact
activated={ !!this.props.getOptionValue( 'hide_smile' ) }
toggling={ this.props.isSavingAnyOption( [ 'stats', 'hide_smile' ] ) }
toggleModule={ m => this.props.updateFormStateModuleOption( m, 'hide_smile' ) }>
<span className="jp-form-toggle-explanation">
{
__( 'Hide the stats smiley face image. The image helps collect stats, but should work when hidden.' )
Expand Down
18 changes: 8 additions & 10 deletions _inc/client/writing/theme-enhancements.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* External dependencies
*/
import analytics from 'lib/analytics';
import React from 'react';
import { translate as __ } from 'i18n-calypso';
import Card from 'components/card';

/**
* Internal dependencies
Expand All @@ -23,7 +21,7 @@ export const ThemeEnhancements = moduleSettingsForm(
return (
<SettingsCard
{ ...this.props }
header={ __( 'Theme enhancements' ) }>
header={ __( 'Theme Enhancements' ) }>
{
[
{
Expand Down Expand Up @@ -58,12 +56,12 @@ export const ThemeEnhancements = moduleSettingsForm(
}
].map( item => {
return (
<Card compact className="jp-form-has-child jp-form-settings-group" key={ `theme_enhancement_${ item.module }` }>
<SettingsGroup compact hasChild key={ `theme_enhancement_${ item.module }` }>
<ModuleToggle slug={ item.module }
compact
activated={ this.props.getOptionValue( item.module ) }
toggling={ this.props.isSavingAnyOption( item.module ) }
toggleModule={ this.props.toggleModuleNow }>
compact
activated={ this.props.getOptionValue( item.module ) }
toggling={ this.props.isSavingAnyOption( item.module ) }
toggleModule={ this.props.toggleModuleNow }>
<span className="jp-form-toggle-explanation">
{
item.description
Expand All @@ -80,11 +78,11 @@ export const ThemeEnhancements = moduleSettingsForm(
label={ chkbx.label }
key={ `${ item.module }_${ chkbx.key }`}
/>
} )
} )
: ''
}
</FormFieldset>
</Card>
</SettingsGroup>
);
} )
}
Expand Down