-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate group description, sidebar & edit form
- Loading branch information
Showing
6 changed files
with
101 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/components/forms/LocalizedTextsFormField/LocalizedGroupFormField.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import { Field } from 'redux-form'; | ||
import { | ||
MarkdownTextAreaField, | ||
LanguageSelectField, | ||
TextField | ||
} from '../Fields'; | ||
|
||
const LocalizedGroupFormField = ({ prefix }) => | ||
<div> | ||
<Field | ||
name={`${prefix}.name`} | ||
component={TextField} | ||
label={ | ||
<FormattedMessage | ||
id="app.editGroupForm.localized.name" | ||
defaultMessage="Name:" | ||
/> | ||
} | ||
/> | ||
|
||
<Field | ||
name={`${prefix}.locale`} | ||
component={LanguageSelectField} | ||
label={ | ||
<FormattedMessage | ||
id="app.editGroupForm.localized.locale" | ||
defaultMessage="The language:" | ||
/> | ||
} | ||
/> | ||
|
||
<Field | ||
name={`${prefix}.description`} | ||
component={MarkdownTextAreaField} | ||
label={ | ||
<FormattedMessage | ||
id="app.editGroupForm.description" | ||
defaultMessage="Group description:" | ||
/> | ||
} | ||
/> | ||
</div>; | ||
|
||
LocalizedGroupFormField.propTypes = { | ||
prefix: PropTypes.string.isRequired | ||
}; | ||
|
||
export default LocalizedGroupFormField; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters