Unverified Commit f66359f8 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Update configs (#454)

parent 0368e371
export const DEFAULT_ERROR_TEXT = 'There was a problem with the request, please reload the page.';
export const USERID_LABEL = 'email address';
......@@ -12,13 +12,13 @@ import { UpdateMethod, UpdateOwnerPayload } from 'interfaces';
// TODO: Use css-modules instead of 'import'
import './styles.scss';
const DEFAULT_ERROR_TEXT = 'There was a problem with the request, please reload the page.';
import { GlobalState } from 'ducks/rootReducer';
import { updateTableOwner } from 'ducks/tableMetadata/owners/reducer';
import { EditableSectionChildProps } from 'components/common/EditableSection';
import { logClick } from 'ducks/utilMethods';
import * as Constants from './constants';
export interface DispatchFromProps {
onUpdateList: (updateArray: UpdateOwnerPayload[], onSuccess?: () => any, onFailure?: () => any) => void;
}
......@@ -102,7 +102,7 @@ export class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorSt
this.props.setEditMode(false);
};
const onFailureCallback = () => {
this.setState({ errorText: DEFAULT_ERROR_TEXT, readOnly: true });
this.setState({ errorText: Constants.DEFAULT_ERROR_TEXT, readOnly: true });
this.props.setEditMode(false);
};
this.props.onUpdateList(updateArray, onSuccessCallback, onFailureCallback);
......@@ -152,7 +152,7 @@ export class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorSt
<input
id='add-item-input'
autoFocus={true}
placeholder={`Please enter ${AppConfig.userIdLabel}`}
placeholder={`Please enter ${AppConfig.userIdLabel || Constants.USERID_LABEL}`}
ref={ this.inputRef }
/>
<button className="btn btn-default add-button" type="submit" aria-label="Add Item">
......
......@@ -14,7 +14,7 @@ export interface AppConfig {
google: GoogleAnalyticsConfig;
indexDashboards: IndexDashboardsConfig;
indexUsers: IndexUsersConfig;
userIdLabel: string;
userIdLabel?: string; /* Temporary configuration due to lacking string customization/translation support */
issueTracking: IssueTrackingConfig;
logoPath: string | null;
mailClientFeatures: MailClientFeaturesConfig;
......@@ -32,7 +32,7 @@ export interface AppConfigCustom {
google?: GoogleAnalyticsConfig;
indexDashboards?: IndexDashboardsConfig;
indexUsers?: IndexUsersConfig;
userIdLabel: string;
userIdLabel?: string; /* Temporary configuration due to lacking string customization/translation support */
issueTracking?: IssueTrackingConfig;
logoPath?: string;
mailClientFeatures?: MailClientFeaturesConfig;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment