IO-1949 Add additional buttons to email overlay.
This commit is contained in:
@@ -15416,6 +15416,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>send</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>senderrortosupport</name>
|
<name>senderrortosupport</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Divider, Form, Modal, notification } from "antd";
|
import { Button, Divider, Form, Modal, notification, Space } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -180,8 +180,10 @@ export function EmailOverlayContainer({
|
|||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
toggleEmailOverlayVisible();
|
toggleEmailOverlayVisible();
|
||||||
}}
|
}}
|
||||||
|
okText={t("general.actions.send")}
|
||||||
okButtonProps={{
|
okButtonProps={{
|
||||||
loading: sending,
|
loading: sending,
|
||||||
|
|
||||||
disabled:
|
disabled:
|
||||||
selectedMedia &&
|
selectedMedia &&
|
||||||
(selectedMedia
|
(selectedMedia
|
||||||
@@ -191,21 +193,56 @@ export function EmailOverlayContainer({
|
|||||||
selectedMedia.filter((s) => s.isSelected).length > 10),
|
selectedMedia.filter((s) => s.isSelected).length > 10),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form layout="vertical" form={form} onFinish={handleFinish}>
|
<div>
|
||||||
{loading && (
|
<div
|
||||||
<div>
|
style={{
|
||||||
<LoadingSkeleton />
|
marginTop: "1rem",
|
||||||
<Divider>{t("emails.labels.preview")}</Divider>
|
display: "flex",
|
||||||
<LoadingSpinner message={t("emails.labels.generatingemail")} />
|
justifyContent: "flex-end",
|
||||||
</div>
|
}}
|
||||||
)}
|
>
|
||||||
{!loading && (
|
<Space style={{ alignSelf: "flex-end" }} align="right">
|
||||||
<EmailOverlayComponent
|
<Button
|
||||||
form={form}
|
onClick={() => {
|
||||||
selectedMediaState={[selectedMedia, setSelectedMedia]}
|
toggleEmailOverlayVisible();
|
||||||
/>
|
}}
|
||||||
)}
|
>
|
||||||
</Form>
|
{t("general.actions.cancel")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
loading={sending}
|
||||||
|
onClick={() => form.submit()}
|
||||||
|
disabled={
|
||||||
|
selectedMedia &&
|
||||||
|
(selectedMedia
|
||||||
|
.filter((s) => s.isSelected)
|
||||||
|
.reduce((acc, val) => (acc = acc + val.size), 0) >=
|
||||||
|
10485760 - new Blob([form.getFieldValue("html")]).size ||
|
||||||
|
selectedMedia.filter((s) => s.isSelected).length > 10)
|
||||||
|
}
|
||||||
|
type="primary"
|
||||||
|
>
|
||||||
|
{t("general.actions.send")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
<Form layout="vertical" form={form} onFinish={handleFinish}>
|
||||||
|
{loading && (
|
||||||
|
<div>
|
||||||
|
<LoadingSkeleton />
|
||||||
|
<Divider>{t("emails.labels.preview")}</Divider>
|
||||||
|
<LoadingSpinner message={t("emails.labels.generatingemail")} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!loading && (
|
||||||
|
<EmailOverlayComponent
|
||||||
|
form={form}
|
||||||
|
selectedMediaState={[selectedMedia, setSelectedMedia]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -964,6 +964,7 @@
|
|||||||
"save": "Save",
|
"save": "Save",
|
||||||
"saveandnew": "Save and New",
|
"saveandnew": "Save and New",
|
||||||
"selectall": "Select All",
|
"selectall": "Select All",
|
||||||
|
"send": "Send",
|
||||||
"senderrortosupport": "Send Error to Support",
|
"senderrortosupport": "Send Error to Support",
|
||||||
"submit": "Submit",
|
"submit": "Submit",
|
||||||
"tryagain": "Try Again",
|
"tryagain": "Try Again",
|
||||||
|
|||||||
@@ -964,6 +964,7 @@
|
|||||||
"save": "Salvar",
|
"save": "Salvar",
|
||||||
"saveandnew": "",
|
"saveandnew": "",
|
||||||
"selectall": "",
|
"selectall": "",
|
||||||
|
"send": "",
|
||||||
"senderrortosupport": "",
|
"senderrortosupport": "",
|
||||||
"submit": "",
|
"submit": "",
|
||||||
"tryagain": "",
|
"tryagain": "",
|
||||||
|
|||||||
@@ -964,6 +964,7 @@
|
|||||||
"save": "sauvegarder",
|
"save": "sauvegarder",
|
||||||
"saveandnew": "",
|
"saveandnew": "",
|
||||||
"selectall": "",
|
"selectall": "",
|
||||||
|
"send": "",
|
||||||
"senderrortosupport": "",
|
"senderrortosupport": "",
|
||||||
"submit": "",
|
"submit": "",
|
||||||
"tryagain": "",
|
"tryagain": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user