@capillarytech/creatives-library 8.0.261 → 8.0.262-alpha.0
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
|
@@ -1828,21 +1828,24 @@ export class Creatives extends React.Component {
|
|
|
1828
1828
|
// Check if Continue button should be disabled (for new flow only)
|
|
1829
1829
|
isContinueButtonDisabled = () => {
|
|
1830
1830
|
const { currentChannel, emailCreateMode, templateNameExists } = this.state;
|
|
1831
|
-
const { isFullMode } = this.props;
|
|
1831
|
+
const { isFullMode, EmailLayout } = this.props;
|
|
1832
1832
|
const supportCKEditor = commonUtil.hasSupportCKEditor();
|
|
1833
1833
|
if (supportCKEditor) {
|
|
1834
1834
|
return false;
|
|
1835
1835
|
}
|
|
1836
1836
|
if (currentChannel.toUpperCase() === constants.EMAIL) {
|
|
1837
|
+
// Upload mode: enable when a file has been uploaded (EmailLayout set by ZIP or HTML upload)
|
|
1838
|
+
// Other modes: enable when an editor type is selected (html_editor, drag_drop, editor)
|
|
1839
|
+
const isUploadComplete = emailCreateMode === 'upload' && !isEmpty(EmailLayout);
|
|
1837
1840
|
const isEditorSelected = !!emailCreateMode && emailCreateMode !== 'upload';
|
|
1838
|
-
|
|
1839
|
-
// In
|
|
1841
|
+
const canContinue = isUploadComplete || isEditorSelected;
|
|
1842
|
+
// In full mode: require both template name AND (upload complete or editor selected)
|
|
1843
|
+
// In library mode: require only upload complete or editor selection
|
|
1840
1844
|
if (isFullMode) {
|
|
1841
1845
|
const isTemplateNameValid = templateNameExists;
|
|
1842
|
-
return !(isTemplateNameValid &&
|
|
1846
|
+
return !(isTemplateNameValid && canContinue);
|
|
1843
1847
|
}
|
|
1844
|
-
|
|
1845
|
-
return !isEditorSelected;
|
|
1848
|
+
return !canContinue;
|
|
1846
1849
|
}
|
|
1847
1850
|
return true;
|
|
1848
1851
|
}
|
|
@@ -899,8 +899,13 @@ const EmailHTMLEditor = (props) => {
|
|
|
899
899
|
|
|
900
900
|
// Handle success response
|
|
901
901
|
if (createResponse && createResponse.templateId) {
|
|
902
|
-
const successMessage = formatMessage(
|
|
903
|
-
|
|
902
|
+
const successMessage = formatMessage(
|
|
903
|
+
isEditModeForSave ? emailMessages.emailEditSuccess : emailMessages.emailCreateSuccess
|
|
904
|
+
);
|
|
905
|
+
CapNotification.success({
|
|
906
|
+
message: successMessage,
|
|
907
|
+
key: isEditModeForSave ? 'edit-template-success' : 'create-template-success',
|
|
908
|
+
});
|
|
904
909
|
|
|
905
910
|
const module = location?.query?.module || 'default';
|
|
906
911
|
const type = location?.query?.type;
|