+ <>
{this.props.intl.formatMessage(messages['account.settings.section.account.information'])}
@@ -247,9 +248,9 @@ class AccountSettingsPage extends React.Component {
value={this.props.formValues.name}
label={this.props.intl.formatMessage(messages['account.settings.field.full.name'])}
emptyLabel={
- this.isEditable('name') ?
- this.props.intl.formatMessage(messages['account.settings.field.full.name.empty']) :
- this.renderEmptyStaticFieldMessage()
+ this.isEditable('name')
+ ? this.props.intl.formatMessage(messages['account.settings.field.full.name.empty'])
+ : this.renderEmptyStaticFieldMessage()
}
helpText={this.props.intl.formatMessage(messages['account.settings.field.full.name.help.text'])}
isEditable={this.isEditable('name')}
@@ -259,9 +260,9 @@ class AccountSettingsPage extends React.Component {
name="email"
label={this.props.intl.formatMessage(messages['account.settings.field.email'])}
emptyLabel={
- this.isEditable('email') ?
- this.props.intl.formatMessage(messages['account.settings.field.email.empty']) :
- this.renderEmptyStaticFieldMessage()
+ this.isEditable('email')
+ ? this.props.intl.formatMessage(messages['account.settings.field.email.empty'])
+ : this.renderEmptyStaticFieldMessage()
}
value={this.props.formValues.email}
confirmationMessageDefinition={messages['account.settings.field.email.confirmation']}
@@ -287,9 +288,9 @@ class AccountSettingsPage extends React.Component {
options={countryOptions}
label={this.props.intl.formatMessage(messages['account.settings.field.country'])}
emptyLabel={
- this.isEditable('country') ?
- this.props.intl.formatMessage(messages['account.settings.field.country.empty']) :
- this.renderEmptyStaticFieldMessage()
+ this.isEditable('country')
+ ? this.props.intl.formatMessage(messages['account.settings.field.country.empty'])
+ : this.renderEmptyStaticFieldMessage()
}
isEditable={this.isEditable('country')}
{...editableFieldProps}
@@ -328,14 +329,15 @@ class AccountSettingsPage extends React.Component {
emptyLabel={this.props.intl.formatMessage(messages['account.settings.field.language.proficiencies.empty'])}
{...editableFieldProps}
/>
- {getConfig().COACHING_ENABLED &&
- this.props.formValues.coaching.eligible_for_coaching &&
+ {getConfig().COACHING_ENABLED
+ && this.props.formValues.coaching.eligible_for_coaching
+ && (
- }
+ )}
@@ -414,7 +416,7 @@ class AccountSettingsPage extends React.Component {
/>
-
+ >
);
}
diff --git a/src/account-settings/EditableField.jsx b/src/account-settings/EditableField.jsx
index cdb57c6..8439ee7 100644
--- a/src/account-settings/EditableField.jsx
+++ b/src/account-settings/EditableField.jsx
@@ -2,7 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
-import { Button, Input, StatefulButton, ValidationFormGroup } from '@edx/paragon';
+import {
+ Button, Input, StatefulButton, ValidationFormGroup,
+} from '@edx/paragon';
import { faPencilAlt } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -65,20 +67,20 @@ function EditableField(props) {
};
const renderValue = (rawValue) => {
- if (!rawValue) return renderEmptyLabel();
+ if (!rawValue) { return renderEmptyLabel(); }
if (options) {
// Use == instead of === to prevent issues when HTML casts numbers as strings
// eslint-disable-next-line eqeqeq
const selectedOption = options.find(option => option.value == rawValue);
- if (selectedOption) return selectedOption.label;
+ if (selectedOption) { return selectedOption.label; }
}
return rawValue;
};
const renderConfirmationMessage = () => {
- if (!confirmationMessageDefinition || !confirmationValue) return null;
+ if (!confirmationMessageDefinition || !confirmationValue) { return null; }
return intl.formatMessage(confirmationMessageDefinition, {
value: confirmationValue,
});
@@ -123,7 +125,7 @@ function EditableField(props) {
// Swallowing the onSubmit event on the form would be better, but
// we would have to add that logic for every field given our
// current structure of the application.
- if (saveState === 'pending') e.preventDefault();
+ if (saveState === 'pending') { e.preventDefault(); }
}}
disabledStates={[]}
/>
diff --git a/src/account-settings/EmailField.jsx b/src/account-settings/EmailField.jsx
index 037c723..8475a41 100644
--- a/src/account-settings/EmailField.jsx
+++ b/src/account-settings/EmailField.jsx
@@ -2,7 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl, intlShape, FormattedMessage } from '@edx/frontend-platform/i18n';
-import { Button, StatefulButton, Input, ValidationFormGroup } from '@edx/paragon';
+import {
+ Button, StatefulButton, Input, ValidationFormGroup,
+} from '@edx/paragon';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faExclamationTriangle, faPencilAlt } from '@fortawesome/free-solid-svg-icons';
@@ -56,7 +58,7 @@ function EmailField(props) {
};
const renderConfirmationMessage = () => {
- if (!confirmationMessageDefinition || !confirmationValue) return null;
+ if (!confirmationMessageDefinition || !confirmationValue) { return null; }
return (