@capillarytech/creatives-library 7.14.1 → 7.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -20,7 +20,6 @@ const renderComponent = props => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
describe("test for empty email empty template name", () => {
|
|
23
|
-
|
|
24
23
|
it("check the error message and disabled button", async () => {
|
|
25
24
|
const shouldShowDoneFooter = jest.fn();
|
|
26
25
|
shouldShowDoneFooter.mockReturnValue(true);
|
|
@@ -57,7 +57,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
57
57
|
|
|
58
58
|
},
|
|
59
59
|
// selectedCreateMode: '',
|
|
60
|
-
|
|
60
|
+
isTemplateNameEmpty: true,
|
|
61
61
|
};
|
|
62
62
|
this.modes = [
|
|
63
63
|
{
|
|
@@ -210,7 +210,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
210
210
|
const {
|
|
211
211
|
templateName,
|
|
212
212
|
modeContent,
|
|
213
|
-
|
|
213
|
+
isTemplateNameEmpty,
|
|
214
214
|
} = this.state;
|
|
215
215
|
const isShowEmailCreate = this.isShowEmailCreate();
|
|
216
216
|
return (
|
|
@@ -240,12 +240,12 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
240
240
|
{emailCreateMode === "upload" &&
|
|
241
241
|
<div style={{ marginLeft: '8px' }}>
|
|
242
242
|
<CapUploader onChange={this.useFileUpload} accept=".zip, .html, .htm" showUploadList={false}>
|
|
243
|
-
{ (isFullMode &&
|
|
243
|
+
{ (isFullMode && isTemplateNameEmpty) &&
|
|
244
244
|
<CapError type="error">
|
|
245
245
|
< FormattedMessage {...messages.emptyTemplateName} />
|
|
246
246
|
</CapError>
|
|
247
247
|
}
|
|
248
|
-
<CapButton disabled={isFullMode &&
|
|
248
|
+
<CapButton disabled={isFullMode && isTemplateNameEmpty}>{this.props.intl.formatMessage(messages.upload)}</CapButton>
|
|
249
249
|
</CapUploader>
|
|
250
250
|
{!_.isEmpty(EmailLayout) &&
|
|
251
251
|
<div>{_.get(modeContent, "file.name")}</div>
|