Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1348 | Source/Collection form | added place…
Browse files Browse the repository at this point in the history
…holder
  • Loading branch information
snyaggarwal committed Oct 12, 2022
1 parent 3565c6f commit de97b73
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/collections/CollectionFormConfigs.jsx
Expand Up @@ -32,13 +32,15 @@ const CONFIG = {
},
supportedLanguages: {
label: 'Supported Languages',
placeholder: 'Choose Supported languages',
tooltip: 'Other languages that may be used in your Collection.',
},
},
configuration: {
title: 'Configuration',
type: {
label: 'Collection type',
placeholder: 'Select collection type',
tooltip: 'The type of Collection that you want to create. Note that some Collection types have special meaning.',
},
customValidationSchema: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/LocaleAutoComplete.jsx
Expand Up @@ -3,7 +3,7 @@ import { TextField, Box, Divider, Autocomplete } from '@mui/material';
import { get, isEmpty, find, uniqBy } from 'lodash'
import { fetchLocales } from '../../common/utils';

const LocaleAutoComplete = ({ cachedLocales, id, selected, multiple, required, onChange, label, error, size, fullWidth, ...rest }) => {
const LocaleAutoComplete = ({ cachedLocales, id, selected, multiple, required, onChange, label, error, size, fullWidth, placeholder, ...rest }) => {
const [locales, setLocales] = React.useState(cachedLocales || [])
const _fullWidth = !(fullWidth === false)

Expand Down Expand Up @@ -64,6 +64,7 @@ const LocaleAutoComplete = ({ cachedLocales, id, selected, multiple, required, o
size={size || 'medium'}
required={required}
label={label}
placeholder={placeholder}
error={error}
variant="outlined"
fullWidth={_fullWidth}
Expand Down
Expand Up @@ -118,6 +118,7 @@ const ConfigurationForm = props => {
{...params}
required
label={configs.type.label}
placeholder={configs.type.placeholder}
variant="outlined"
fullWidth
/>
Expand Down
Expand Up @@ -60,6 +60,7 @@ const LanguageForm = props => {
<LocaleAutoComplete
cachedLocales={locales}
label={configs.defaultLanguage.label}
placeholder={configs.defaultLanguage.placeholder}
size='small'
required
value={defaultLocale}
Expand All @@ -76,6 +77,7 @@ const LanguageForm = props => {
multiple
filterSelectedOptions
label={configs.supportedLanguages.label}
placeholder={configs.supportedLanguages.placeholder}
size='small'
value={supportedLocales}
onChange={(id, items) => onChange('supported_locales', items, setSupportedLocales, map(items, 'id').join(','))}
Expand Down
2 changes: 2 additions & 0 deletions src/components/sources/SourceFormConfigs.jsx
Expand Up @@ -32,13 +32,15 @@ const CONFIG = {
},
supportedLanguages: {
label: 'Supported Languages',
placeholder: 'Choose Supported languages',
tooltip: 'Other languages that may be used in your Source.',
},
},
configuration: {
title: 'Configuration',
type: {
label: 'Source type',
placeholder: 'Select source type',
tooltip: 'The type of Source that you want to create. Note that some Source types have special meaning.',
},
customValidationSchema: {
Expand Down

0 comments on commit de97b73

Please sign in to comment.