diff --git a/clients/libs/ckeditor5-custom-build/src/ckeditor.ts b/clients/libs/ckeditor5-custom-build/src/ckeditor.ts
index e6991575c..c9a5627ac 100644
--- a/clients/libs/ckeditor5-custom-build/src/ckeditor.ts
+++ b/clients/libs/ckeditor5-custom-build/src/ckeditor.ts
@@ -103,6 +103,14 @@ class Editor extends ClassicEditor {
]
},
language: 'pt-br',
+ heading: {
+ options: [
+ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
+ { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
+ { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
+ { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }
+ ]
+ },
image: {
toolbar: [
'imageTextAlternative',
diff --git a/clients/packages/canary-client/public/locales/en/widgetActions.json b/clients/packages/canary-client/public/locales/en/widgetActions.json
index 7228f30d9..b3ca87449 100644
--- a/clients/packages/canary-client/public/locales/en/widgetActions.json
+++ b/clients/packages/canary-client/public/locales/en/widgetActions.json
@@ -41,7 +41,7 @@
"defaultForm": {
"error": "Houve um erro ao salvar o formulário",
"success": "EBA! Suas alterações foram salvas.",
- "submit": "Salvar"
+ "submit": "Salvar alterações"
},
"adjusts": {
"title": "Formulário",
diff --git a/clients/packages/canary-client/public/locales/es/widgetActions.json b/clients/packages/canary-client/public/locales/es/widgetActions.json
index 7228f30d9..b3ca87449 100644
--- a/clients/packages/canary-client/public/locales/es/widgetActions.json
+++ b/clients/packages/canary-client/public/locales/es/widgetActions.json
@@ -41,7 +41,7 @@
"defaultForm": {
"error": "Houve um erro ao salvar o formulário",
"success": "EBA! Suas alterações foram salvas.",
- "submit": "Salvar"
+ "submit": "Salvar alterações"
},
"adjusts": {
"title": "Formulário",
diff --git a/clients/packages/canary-client/public/locales/pt-BR/widgetActions.json b/clients/packages/canary-client/public/locales/pt-BR/widgetActions.json
index dfc7d36a4..64c86061a 100644
--- a/clients/packages/canary-client/public/locales/pt-BR/widgetActions.json
+++ b/clients/packages/canary-client/public/locales/pt-BR/widgetActions.json
@@ -35,7 +35,7 @@
"defaultForm": {
"error": "Houve um erro ao salvar o formulário",
"success": "EBA! Suas alterações foram salvas.",
- "submit": "Salvar"
+ "submit": "Salvar alterações"
},
"pressure": {
"targets": {
diff --git a/clients/packages/canary-client/src/scenes/WidgetActions/Settings/Autofire/index.tsx b/clients/packages/canary-client/src/scenes/WidgetActions/Settings/Autofire/index.tsx
index 3358da688..c174c51d2 100644
--- a/clients/packages/canary-client/src/scenes/WidgetActions/Settings/Autofire/index.tsx
+++ b/clients/packages/canary-client/src/scenes/WidgetActions/Settings/Autofire/index.tsx
@@ -1,5 +1,6 @@
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
+import styled from 'styled-components';
import { InputField, Validators } from 'bonde-components';
import {
@@ -8,7 +9,8 @@ import {
Flex,
Grid,
GridItem,
- Heading
+ Heading,
+ FormLabel
} from "bonde-components/chakra";
import ClassicEditor from "ckeditor5-custom-build";
@@ -18,6 +20,16 @@ import { noSpecialCharacters } from "../../../../services/utils";
import { Widget } from "../../FetchWidgets";
import SettingsForm from '../SettingsForm';
+const Styles = styled.div`
+ .emailBody {
+ padding-bottom: 30px;
+ }
+
+ .emailBody--label {
+ padding-bottom: 4px;
+ }
+`
+
type Props = {
widget: Widget;
updateCache: any;
@@ -28,86 +40,87 @@ const { required, composeValidators, isEmail } = Validators;
const AutofireForm = ({ widget, updateCache }: Props): React.ReactElement => {
const { t } = useTranslation("widgetActions");
- const [editorData, setEditorData] = useState('');
-
+ const [editorData, setEditorData] = useState(t("settings.autofire.placeholder.emailBody"));
return (
- {
- updateCache(result.data.update_widgets.returning[0])
- }}
- initialValues={{
- settings: widget.settings
- }}
- >
- {({ submitting, dirty }: any) => (
-
-
-
- {t("settings.autofire.title")}
-
-
-
- {/* */}
- "
- }
- }
- }}
- onChange={(event, editor) => {
- const data = editor.getData();
- setEditorData(data);
- }}
- />
-
-
-
-
-
-
- )}
-
+
+ {
+ updateCache(result.data.update_widgets.returning[0])
+ }}
+ initialValues={{
+ settings: widget.settings
+ }}
+ >
+ {({ submitting, dirty }: any) => (
+
+
+
+ {t("settings.autofire.title")}
+
+
+
+
+
+ {t("settings.autofire.label.emailBody")}
+
+ "
+ }
+ }
+ }}
+ onChange={(event, editor) => {
+ const data = editor.getData();
+ setEditorData(data);
+ }}
+ validate={composeValidators(
+ required(t("settings.autofire.validators.required"))
+ )}
+ />
+
+
+
+
+
+
+
+ )}
+
+
);
};