Postponing the feature of having custom forms in multiple languages. I'm not exactly sure about the use-case as usually a mailing list is connected with a particular language that is used in the list. The related form can be in the same language.
This commit is contained in:
parent
f7cbcf871d
commit
4f5b2d10e4
1 changed files with 1 additions and 12 deletions
|
@ -34,7 +34,6 @@ import {
|
||||||
import {DeleteModalDialog} from "../../lib/modals";
|
import {DeleteModalDialog} from "../../lib/modals";
|
||||||
import mailtrainConfig
|
import mailtrainConfig
|
||||||
from 'mailtrainConfig';
|
from 'mailtrainConfig';
|
||||||
import {langCodes} from "../../../../shared/langs";
|
|
||||||
|
|
||||||
@withTranslation()
|
@withTranslation()
|
||||||
@withForm
|
@withForm
|
||||||
|
@ -285,7 +284,6 @@ export default class CUD extends Component {
|
||||||
name: '',
|
name: '',
|
||||||
description: '',
|
description: '',
|
||||||
selectedTemplate: 'layout',
|
selectedTemplate: 'layout',
|
||||||
selectedLanguage: '',
|
|
||||||
namespace: mailtrainConfig.user.namespace
|
namespace: mailtrainConfig.user.namespace
|
||||||
};
|
};
|
||||||
supplyDefaults(data);
|
supplyDefaults(data);
|
||||||
|
@ -381,12 +379,6 @@ export default class CUD extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const langOptions = [{key: '', label: t('Default')}];
|
|
||||||
for (const lng of mailtrainConfig.enabledLanguages) {
|
|
||||||
langOptions.push({key: lng, label: langCodes[lng].getLabel(t)});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const listsColumns = [
|
const listsColumns = [
|
||||||
{ data: 0, title: "#" },
|
{ data: 0, title: "#" },
|
||||||
{ data: 1, title: t('name') },
|
{ data: 1, title: t('name') },
|
||||||
|
@ -396,7 +388,6 @@ export default class CUD extends Component {
|
||||||
|
|
||||||
const previewListId = this.getFormValue('previewList');
|
const previewListId = this.getFormValue('previewList');
|
||||||
const selectedTemplate = this.getFormValue('selectedTemplate');
|
const selectedTemplate = this.getFormValue('selectedTemplate');
|
||||||
const selectedLanguage = this.getFormValue('selectedLanguage');
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -457,10 +448,8 @@ export default class CUD extends Component {
|
||||||
|
|
||||||
{ selectedTemplate &&
|
{ selectedTemplate &&
|
||||||
<Fieldset label={t('templates')}>
|
<Fieldset label={t('templates')}>
|
||||||
<Dropdown id="selectedLanguage" label={t('Language')} options={langOptions}/>
|
|
||||||
<CheckBox id={'languageEnabled_' + selectedLanguage} text={t('Enabled')}/>
|
|
||||||
<Dropdown id="selectedTemplate" label={t('edit')} options={templateOptGroups} help={this.templateSettings[selectedTemplate].help}/>
|
<Dropdown id="selectedTemplate" label={t('edit')} options={templateOptGroups} help={this.templateSettings[selectedTemplate].help}/>
|
||||||
<ACEEditor id={(selectedLanguage ? selectedLanguage + ':' : '') + selectedTemplate} height="500px" mode={this.templateSettings[selectedTemplate].mode}/>
|
<ACEEditor id={selectedTemplate} height="500px" mode={this.templateSettings[selectedTemplate].mode}/>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue