Some fixes.
This commit is contained in:
parent
41cd01c2b9
commit
d54f941caa
5 changed files with 25 additions and 7 deletions
|
@ -410,6 +410,7 @@ export default class CUD extends Component {
|
|||
const response = await axios.post(getUrl('rest/forms-preview'), data);
|
||||
|
||||
this.setState({
|
||||
previewKey: formKey,
|
||||
previewContents: response.data.content,
|
||||
previewLabel: this.templateSettings[formKey].label
|
||||
});
|
||||
|
@ -504,10 +505,15 @@ export default class CUD extends Component {
|
|||
{this.state.previewContents &&
|
||||
<div className={this.state.previewFullscreen ? formsStyles.editorFullscreen : formsStyles.editor}>
|
||||
<div className={formsStyles.navbar}>
|
||||
{this.state.fullscreen && <img className={formsStyles.logo} src={getTrustedUrl('static/mailtrain-notext.png')}/>}
|
||||
<div className={formsStyles.title}>{t('formPreview') + ' ' + this.state.previewLabel}</div>
|
||||
<a className={formsStyles.btn} onClick={() => this.setState({previewContents: null, previewFullscreen: false})}><Icon icon="window-close"/></a>
|
||||
<a className={formsStyles.btn} onClick={() => this.setState({previewFullscreen: !this.state.previewFullscreen})}><Icon icon="window-maximize"/></a>
|
||||
<div className={formsStyles.navbarLeft}>
|
||||
{this.state.fullscreen && <img className={formsStyles.logo} src={getTrustedUrl('static/mailtrain-notext.png')}/>}
|
||||
<div className={formsStyles.title}>{t('formPreview') + ' ' + this.state.previewLabel}</div>
|
||||
</div>
|
||||
<div className={formsStyles.navbarRight}>
|
||||
<a className={formsStyles.btn} onClick={() => this.preview(this.state.previewKey)} title={t('Refresh')}><Icon icon="sync-alt"/></a>
|
||||
<a className={formsStyles.btn} onClick={() => this.setState({previewFullscreen: !this.state.previewFullscreen})} title={t('Maximize editor')}><Icon icon="window-maximize"/></a>
|
||||
<a className={formsStyles.btn} onClick={() => this.setState({previewContents: null, previewFullscreen: false})} title={t('Close preview')}><Icon icon="window-close"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<iframe className={formsStyles.host} src={"data:text/html;charset=utf-8," + encodeURIComponent(this.state.previewContents)}></iframe>
|
||||
</div>
|
||||
|
|
|
@ -92,7 +92,7 @@ export default class Status extends Component {
|
|||
const columns = [
|
||||
{ data: 1, title: t('row') },
|
||||
{ data: 2, title: t('email') },
|
||||
{ data: 3, title: t('reason') }
|
||||
{ data: 3, title: t('reason'), render: data => t(...JSON.parse(data)) }
|
||||
];
|
||||
|
||||
return (
|
||||
|
|
|
@ -150,7 +150,7 @@ export default class Status extends Component {
|
|||
}
|
||||
|
||||
actions.push({
|
||||
label: <Icon icon="eye-open" title={t('runStatus')}/>,
|
||||
label: <Icon icon="eye" title={t('runStatus')}/>,
|
||||
link: `/lists/${this.props.list.id}/imports/${this.props.entity.id}/status/${data[0]}`
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue