More elements for mosaico mjml support. Added "MJML Sample" wizard to mosaico templates.
This commit is contained in:
parent
ec0f288d81
commit
94a2cdf89e
7 changed files with 415 additions and 12 deletions
|
|
@ -27,7 +27,7 @@ import {
|
|||
} from '../../lib/namespace';
|
||||
import {DeleteModalDialog} from "../../lib/modals";
|
||||
|
||||
import {getVersafix} from "../../../../shared/mosaico-templates";
|
||||
import {getVersafix, getMJMLSample} from "../../../../shared/mosaico-templates";
|
||||
import {
|
||||
getTemplateTypes,
|
||||
getTemplateTypesOrder
|
||||
|
|
@ -87,6 +87,15 @@ export default class CUD extends Component {
|
|||
html: getVersafix()
|
||||
});
|
||||
|
||||
} else if (wizard === 'mjml-sample') {
|
||||
this.populateFormValues({
|
||||
name: '',
|
||||
description: '',
|
||||
namespace: mailtrainConfig.user.namespace,
|
||||
type: 'mjml',
|
||||
mjml: getMJMLSample()
|
||||
});
|
||||
|
||||
} else {
|
||||
this.populateFormValues({
|
||||
name: '',
|
||||
|
|
@ -183,7 +192,7 @@ export default class CUD extends Component {
|
|||
<Form stateOwner={this} onSubmitAsync={::this.submitHandler}>
|
||||
<InputField id="name" label={t('name')}/>
|
||||
<TextArea id="description" label={t('description')}/>
|
||||
{isEdit ?
|
||||
{isEdit || this.props.wizard ?
|
||||
<StaticField id="type" className={styles.formDisabled} label={t('type')}>
|
||||
{typeKey && this.templateTypes[typeKey].typeName}
|
||||
</StaticField>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue