mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-30 09:15:02 +02:00
Ivan - Fix email templates editor [skip ci]
This commit is contained in:
parent
a244a58ebc
commit
e286c20085
@ -14,7 +14,6 @@ import Loading from 'core-components/loading';
|
|||||||
import Form from 'core-components/form';
|
import Form from 'core-components/form';
|
||||||
import FormField from 'core-components/form-field';
|
import FormField from 'core-components/form-field';
|
||||||
import SubmitButton from 'core-components/submit-button';
|
import SubmitButton from 'core-components/submit-button';
|
||||||
import TextEditor from 'core-components/text-editor';
|
|
||||||
|
|
||||||
class AdminPanelEmailTemplates extends React.Component {
|
class AdminPanelEmailTemplates extends React.Component {
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ class AdminPanelEmailTemplates extends React.Component {
|
|||||||
language: 'en',
|
language: 'en',
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
title: '',
|
||||||
content: TextEditor.createEmpty()
|
content: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,7 +61,7 @@ class AdminPanelEmailTemplates extends React.Component {
|
|||||||
<FormField label={i18n('TITLE')} name="title" validation="TITLE" required fieldProps={{size: 'large'}}/>
|
<FormField label={i18n('TITLE')} name="title" validation="TITLE" required fieldProps={{size: 'large'}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FormField label={i18n('CONTENT')} name="content" validation="TEXT_AREA" required field="textarea" />
|
<FormField label={i18n('CONTENT')} name="content" validation="TEXT_AREA" required decorator={'textarea'} fieldProps={{className: 'admin-panel-email-templates__text-area'}} />
|
||||||
<div className="admin-panel-email-templates__actions">
|
<div className="admin-panel-email-templates__actions">
|
||||||
<div className="admin-panel-email-templates__save-button">
|
<div className="admin-panel-email-templates__save-button">
|
||||||
<SubmitButton type="secondary" size="small">{i18n('SAVE')}</SubmitButton>
|
<SubmitButton type="secondary" size="small">{i18n('SAVE')}</SubmitButton>
|
||||||
@ -182,7 +181,7 @@ class AdminPanelEmailTemplates extends React.Component {
|
|||||||
language = language || this.state.language;
|
language = language || this.state.language;
|
||||||
|
|
||||||
form.title = (items[index] && items[index][language].subject) || '';
|
form.title = (items[index] && items[index][language].subject) || '';
|
||||||
form.content = TextEditor.getEditorStateFromHTML((items[index] && items[index][language].body) || '');
|
form.content = (items[index] && items[index][language].body) || '';
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedIndex: index,
|
selectedIndex: index,
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
.admin-panel-email-templates {
|
.admin-panel-email-templates {
|
||||||
|
|
||||||
|
&__text-area {
|
||||||
|
width: 100%;
|
||||||
|
height: 157px;
|
||||||
|
}
|
||||||
|
|
||||||
&__save-button {
|
&__save-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -332,7 +332,7 @@ module.exports = [
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
status: "success",
|
status: "success",
|
||||||
data: DATA
|
data: DATA.reverse()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user