Skip to content

Commit

Permalink
Merge pull request #1201 from culturecreates/bugfix/issue-1193
Browse files Browse the repository at this point in the history
fix: fixed warning not appearing in bilingual inputs of general setti…
  • Loading branch information
AbhishekPAnil authored Jul 4, 2024
2 parents 77a0538 + 034adde commit f29c76d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 32 deletions.
71 changes: 39 additions & 32 deletions src/constants/calendarSettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,39 +143,46 @@ export const calendarSettingsFormFields = {
{
name: 'calendarName',
label: <Translation>{(t) => t('dashboard.settings.calendarSettings.calendarName')}</Translation>,
field: ({ t }) => (
<BilingualInput>
<Form.Item name="calendarNameFr">
<TextArea
autoSize
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
width: '100%',
}}
size="large"
autoComplete="off"
placeholder={t('dashboard.settings.calendarSettings.placeholders.calendarNameFr')}
data-cy="input-calendar-name"
/>
</Form.Item>
field: ({ t, initialValues }) => {
const fieldData = {
fr: initialValues?.calendarNameFr,
en: initialValues?.calendarNameEn,
};

<Form.Item name="calendarNameEn">
<TextArea
autoSize
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
width: '100%',
}}
size="large"
autoComplete="off"
placeholder={t('dashboard.settings.calendarSettings.placeholders.calendarNameEn')}
data-cy="input-calendar-name"
/>
</Form.Item>
</BilingualInput>
),
return (
<BilingualInput fieldData={fieldData}>
<Form.Item name="calendarNameFr">
<TextArea
autoSize
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
width: '100%',
}}
size="large"
autoComplete="off"
placeholder={t('dashboard.settings.calendarSettings.placeholders.calendarNameFr')}
data-cy="input-calendar-name"
/>
</Form.Item>

<Form.Item name="calendarNameEn">
<TextArea
autoSize
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
width: '100%',
}}
size="large"
autoComplete="off"
placeholder={t('dashboard.settings.calendarSettings.placeholders.calendarNameEn')}
data-cy="input-calendar-name"
/>
</Form.Item>
</BilingualInput>
);
},
rules: [
({ getFieldValue }) => ({
validator() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ function CalendarSettings({ setDirtyStatus, tabKey }) {
{item.field({
form,
isCrop: false,
initialValues,
largeAspectRatio: imageConfig?.large?.aspectRatio,
thumbnailAspectRatio: imageConfig?.thumbnail?.aspectRatio,
largeMaxWidth: imageConfig?.large?.maxWidth,
Expand Down

0 comments on commit f29c76d

Please sign in to comment.