mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 09:02:36 +08:00
Fix the preview button in the new template form
This commit is contained in:
parent
0849dc491b
commit
9582e20cd7
1 changed files with 8 additions and 6 deletions
|
@ -93,11 +93,13 @@ class CreateFormDef extends React.PureComponent {
|
|||
<Input.TextArea autosize={{ minRows: 10, maxRows: 30 }} />
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item {...formItemLayout} colon={ false } label=" ">
|
||||
<Button icon="search" onClick={ () =>
|
||||
this.handlePreview(this.props.form.getFieldValue("name"), this.props.form.getFieldValue("body"))
|
||||
}>Preview</Button>
|
||||
</Form.Item>
|
||||
{ this.props.form.getFieldValue("body") !== "" &&
|
||||
<Form.Item {...formItemLayout} colon={ false } label=" ">
|
||||
<Button icon="search" onClick={ () =>
|
||||
this.handlePreview(this.props.form.getFieldValue("name"), this.props.form.getFieldValue("body"))
|
||||
}>Preview</Button>
|
||||
</Form.Item>
|
||||
}
|
||||
</Form>
|
||||
</Spin>
|
||||
<Row>
|
||||
|
@ -111,7 +113,7 @@ class CreateFormDef extends React.PureComponent {
|
|||
{ this.state.previewBody &&
|
||||
<ModalPreview
|
||||
title={ this.state.previewName ? this.state.previewName : "Template preview" }
|
||||
previewURL={ cs.Routes.PreviewTemplate }
|
||||
previewURL={ cs.Routes.PreviewNewTemplate }
|
||||
body={ this.state.previewBody }
|
||||
onCancel={() => {
|
||||
this.setState({ previewBody: null, previewName: null })
|
||||
|
|
Loading…
Reference in a new issue