Change settings confirm modal type & change copy locale submit button label

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2021-03-30 09:08:44 +02:00
parent 95a4f340bc
commit 6db4e0c0f3
3 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import { Inputs as Input, Header } from '@buffetjs/custom';
import { import {
BackHeader, BackHeader,
LoadingIndicatorPage, LoadingIndicatorPage,
ModalConfirm,
PopUpWarning, PopUpWarning,
// contexts // contexts
useGlobalContext, useGlobalContext,
@ -204,13 +205,13 @@ const SettingsViewWrapper = ({
toggleWarningCancel(); toggleWarningCancel();
}} }}
/> />
<PopUpWarning <ModalConfirm
isOpen={showWarningSubmit} isOpen={showWarningSubmit}
toggleModal={toggleWarningSubmit} toggle={toggleWarningSubmit}
content={{ content={{
message: `${pluginId}.popUpWarning.warning.updateAllSettings`, id: `${pluginId}.popUpWarning.warning.updateAllSettings`,
}} }}
popUpWarningType="danger" type="success"
onConfirm={async () => { onConfirm={async () => {
await onConfirmSubmit(); await onConfirmSubmit();
toggleWarningSubmit(); toggleWarningSubmit();

View File

@ -101,7 +101,8 @@ const CMEditViewCopyLocale = ({ appLocales, currentLocale, localizations, readPe
<ModalConfirm <ModalConfirm
showButtonLoader={isLoading} showButtonLoader={isLoading}
confirmButtonLabel={{ confirmButtonLabel={{
id: 'form.button.finish', id: getTrad('CMEditViewCopyLocale.submit-text'),
defaultMessage: 'Yes, fill in',
}} }}
content={{ content={{
id: 'CMEditViewCopyLocale.ModalConfirm.content', id: 'CMEditViewCopyLocale.ModalConfirm.content',

View File

@ -17,6 +17,7 @@
"CMEditViewCopyLocale.copy-success": "Locale copied", "CMEditViewCopyLocale.copy-success": "Locale copied",
"CMEditViewCopyLocale.copy-failure": "Failed to copy locale", "CMEditViewCopyLocale.copy-failure": "Failed to copy locale",
"CMEditViewCopyLocale.copy-text": "Fill in from another locale", "CMEditViewCopyLocale.copy-text": "Fill in from another locale",
"CMEditViewCopyLocale.submit-text": "Yes, fill in",
"Field.localized": "This value is unique for the selected locale", "Field.localized": "This value is unique for the selected locale",
"Field.not-localized": "This value is common to all locales", "Field.not-localized": "This value is common to all locales",
"Settings.list.description": "Configure the settings for the internationalization plugin", "Settings.list.description": "Configure the settings for the internationalization plugin",