Bugfixing.
This commit is contained in:
parent
86efa11994
commit
5670d21e76
31 changed files with 241 additions and 216 deletions
|
@ -628,10 +628,11 @@ export default class CUD extends Component {
|
|||
} else if (!isEdit && sourceTypeKey === CampaignSource.CUSTOM_FROM_CAMPAIGN) {
|
||||
const campaignsColumns = [
|
||||
{ data: 1, title: t('Name') },
|
||||
{ data: 2, title: t('Description') },
|
||||
{ data: 3, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{ data: 4, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 5, title: t('Namespace') }
|
||||
{ data: 2, title: t('ID'), render: data => <code>{data}</code> },
|
||||
{ data: 3, title: t('Description') },
|
||||
{ data: 4, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{ data: 5, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 6, title: t('Namespace') }
|
||||
];
|
||||
|
||||
templateEdit = <TableSelect key="campaignSelect" id="data_sourceCampaign" label={t('Campaign')} withHeader dropdown dataUrl='rest/campaigns-with-content-table' columns={campaignsColumns} selectionLabelIndex={1} help={t('Content of the selected campaign will be copied into this campaign.')}/>;
|
||||
|
@ -688,6 +689,13 @@ export default class CUD extends Component {
|
|||
|
||||
<Form stateOwner={this} onSubmitAsync={::this.submitHandler}>
|
||||
<InputField id="name" label={t('Name')}/>
|
||||
|
||||
{isEdit &&
|
||||
<StaticField id="cid" className={styles.formDisabled} label={t('ID')} help={t('This is the campaign ID displayed to the subscribers')}>
|
||||
{this.getFormValue('cid')}
|
||||
</StaticField>
|
||||
}
|
||||
|
||||
<TextArea id="description" label={t('Description')}/>
|
||||
|
||||
{extraSettings}
|
||||
|
|
|
@ -136,7 +136,7 @@ export default class CustomContent extends Component {
|
|||
|
||||
this.disableForm();
|
||||
|
||||
const response = await axios.post(getUrl('rest/html-to-text', { html }));
|
||||
const response = await axios.post(getUrl('rest/html-to-text'), { html });
|
||||
|
||||
this.updateFormValue('data_sourceCustom_text', response.data.text);
|
||||
|
||||
|
@ -175,7 +175,7 @@ export default class CustomContent extends Component {
|
|||
|
||||
{customTemplateTypeKey && getTypeForm(this, customTemplateTypeKey, true)}
|
||||
|
||||
{customTemplateTypeKey && getEditForm(this, customTemplateTypeKey)}
|
||||
{customTemplateTypeKey && getEditForm(this, customTemplateTypeKey, 'data_sourceCustom_')}
|
||||
|
||||
<ButtonRow>
|
||||
<Button type="submit" className="btn-primary" icon="ok" label={t('Save')}/>
|
||||
|
|
|
@ -68,14 +68,15 @@ export default class List extends Component {
|
|||
|
||||
const columns = [
|
||||
{ data: 1, title: t('Name') },
|
||||
{ data: 2, title: t('Description') },
|
||||
{ data: 3, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{ data: 2, title: t('ID'), render: data => <code>{data}</code> },
|
||||
{ data: 3, title: t('Description') },
|
||||
{ data: 4, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{
|
||||
data: 4,
|
||||
data: 5,
|
||||
title: t('Status'),
|
||||
render: (data, display, rowData) => {
|
||||
if (data === CampaignStatus.SCHEDULED) {
|
||||
const scheduled = rowData[5];
|
||||
const scheduled = rowData[6];
|
||||
if (scheduled && new Date(scheduled) > new Date()) {
|
||||
return t('Sending scheduled');
|
||||
} else {
|
||||
|
@ -86,14 +87,14 @@ export default class List extends Component {
|
|||
}
|
||||
}
|
||||
},
|
||||
{ data: 7, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 8, title: t('Namespace') },
|
||||
{ data: 8, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 9, title: t('Namespace') },
|
||||
{
|
||||
actions: data => {
|
||||
const actions = [];
|
||||
const perms = data[9];
|
||||
const campaignType = data[3];
|
||||
const campaignSource = data[6];
|
||||
const perms = data[10];
|
||||
const campaignType = data[4];
|
||||
const campaignSource = data[7];
|
||||
|
||||
if (perms.includes('viewStats')) {
|
||||
actions.push({
|
||||
|
|
|
@ -83,7 +83,7 @@ class TestUser extends Component {
|
|||
|
||||
const testUsersColumns = [
|
||||
{ data: 1, title: t('Email') },
|
||||
{ data: 4, title: t('List ID') },
|
||||
{ data: 4, title: t('List ID'), render: data => <code>{data}</code> },
|
||||
{ data: 5, title: t('List') },
|
||||
{ data: 6, title: t('Segment') },
|
||||
{ data: 7, title: t('List namespace') }
|
||||
|
|
|
@ -61,7 +61,7 @@ function getMenus(t) {
|
|||
title: t('Attachments'),
|
||||
link: params => `/campaigns/${params.campaignId}/attachments`,
|
||||
visible: resolved => resolved.campaign.permissions.includes('viewAttachments'),
|
||||
panelRender: props => <Files title={t('Attachments')} help={t('These files will be attached to the campaign emails as proper attachments. This means they count towards to resulting eventual size of the email.')} entity={props.resolved.campaign} entityTypeId="campaign" entitySubTypeId="attachment" managePermission="manageAttachments"/>
|
||||
panelRender: props => <Files title={t('Attachments')} help={t('These files will be attached to the campaign emails as proper attachments. This means they count towards to the eventual size of the email.')} entity={props.resolved.campaign} entityTypeId="campaign" entitySubTypeId="attachment" managePermission="manageAttachments"/>
|
||||
},
|
||||
triggers: {
|
||||
title: t('Triggers'),
|
||||
|
|
|
@ -185,10 +185,11 @@ export default class CUD extends Component {
|
|||
|
||||
const campaignsColumns = [
|
||||
{ data: 1, title: t('Name') },
|
||||
{ data: 2, title: t('Description') },
|
||||
{ data: 3, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{ data: 4, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 5, title: t('Namespace') }
|
||||
{ data: 2, title: t('ID'), render: data => <code>{data}</code> },
|
||||
{ data: 3, title: t('Description') },
|
||||
{ data: 4, title: t('Type'), render: data => this.campaignTypeLabels[data] },
|
||||
{ data: 5, title: t('Created'), render: data => moment(data).fromNow() },
|
||||
{ data: 6, title: t('Namespace') }
|
||||
];
|
||||
|
||||
const campaignLists = this.props.campaign.lists.map(x => x.list).join(';');
|
||||
|
|
|
@ -181,7 +181,7 @@ export default class CUD extends Component {
|
|||
<InputField id="name" label={t('Name')}/>
|
||||
|
||||
{isEdit &&
|
||||
<StaticField id="cid" className={styles.formDisabled} label={t('List ID')} help={t('This is the list ID displayed to the subscribers')}>
|
||||
<StaticField id="cid" className={styles.formDisabled} label={t('ID')} help={t('This is the list ID displayed to the subscribers')}>
|
||||
{this.getFormValue('cid')}
|
||||
</StaticField>
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ export default class List extends Component {
|
|||
|
||||
if (perms.includes('viewImports')) {
|
||||
actions.push({
|
||||
label: <Icon icon="sort" title={t('Imports & Tasks')}/>,
|
||||
label: <Icon icon="sort" title={t('Imports')}/>,
|
||||
link: `/lists/${data[0]}/imports`
|
||||
});
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ export default class CUD extends Component {
|
|||
deletedMsg={t('Field deleted')}/>
|
||||
}
|
||||
|
||||
<Title>{isEdit ? t('Edit Import/Task') : t('Create Import/Task')}</Title>
|
||||
<Title>{isEdit ? t('Edit Import') : t('Create Import')}</Title>
|
||||
|
||||
<Form stateOwner={this} onSubmitAsync={::this.submitHandler}>
|
||||
<InputField id="name" label={t('Name')}/>
|
||||
|
|
|
@ -81,11 +81,11 @@ export default class List extends Component {
|
|||
<div>
|
||||
{mailtrainConfig.globalPermissions.includes('setupAutomation') && this.props.list.permissions.includes('manageImports') &&
|
||||
<Toolbar>
|
||||
<NavButton linkTo={`/lists/${this.props.list.id}/imports/create`} className="btn-primary" icon="plus" label={t('Create Import/Task')}/>
|
||||
<NavButton linkTo={`/lists/${this.props.list.id}/imports/create`} className="btn-primary" icon="plus" label={t('Create Import')}/>
|
||||
</Toolbar>
|
||||
}
|
||||
|
||||
<Title>{t('Imports & Tasks')}</Title>
|
||||
<Title>{t('Imports')}</Title>
|
||||
|
||||
<Table withHeader dataUrl={`rest/imports-table/${this.props.list.id}`} columns={columns} />
|
||||
</div>
|
||||
|
|
|
@ -132,7 +132,7 @@ function getMenus(t) {
|
|||
}
|
||||
},
|
||||
imports: {
|
||||
title: t('Imports & Tasks'),
|
||||
title: t('Imports'),
|
||||
link: params => `/lists/${params.listId}/imports/`,
|
||||
visible: resolved => resolved.list.permissions.includes('viewImports'),
|
||||
panelRender: props => <ImportsList list={props.resolved.list} />,
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
Form,
|
||||
FormSendMethod,
|
||||
InputField,
|
||||
StaticField,
|
||||
TextArea,
|
||||
withForm
|
||||
} from '../lib/form';
|
||||
|
@ -37,6 +38,8 @@ import {
|
|||
MailerType
|
||||
} from "../../../shared/send-configurations";
|
||||
|
||||
import styles from "../lib/styles.scss";
|
||||
|
||||
import mailtrainConfig from 'mailtrainConfig';
|
||||
|
||||
|
||||
|
@ -189,6 +192,13 @@ export default class CUD extends Component {
|
|||
<Form stateOwner={this} onSubmitAsync={::this.submitHandler}>
|
||||
|
||||
<InputField id="name" label={t('Name')}/>
|
||||
|
||||
{isEdit &&
|
||||
<StaticField id="cid" className={styles.formDisabled} label={t('ID')}>
|
||||
{this.getFormValue('cid')}
|
||||
</StaticField>
|
||||
}
|
||||
|
||||
<TextArea id="description" label={t('Description')}/>
|
||||
<NamespaceSelect/>
|
||||
|
||||
|
@ -221,6 +231,8 @@ export default class CUD extends Component {
|
|||
}
|
||||
</Fieldset>
|
||||
|
||||
<hr/>
|
||||
|
||||
<ButtonRow>
|
||||
<Button type="submit" className="btn-primary" icon="ok" label={t('Save')}/>
|
||||
{canDelete &&
|
||||
|
|
|
@ -89,6 +89,7 @@ export default class Update extends Component {
|
|||
<TextArea id="pgpPrivateKey" label={t('GPG private key')} placeholder={t('Begins with \'-----BEGIN PGP PRIVATE KEY BLOCK-----\'')} help={t('This value is optional. If you do not provide a private key GPG encrypted messages are sent without signing.')}/>
|
||||
</Fieldset>
|
||||
|
||||
<hr/>
|
||||
<ButtonRow>
|
||||
<Button type="submit" className="btn-primary" icon="ok" label={t('Save')}/>
|
||||
</ButtonRow>
|
||||
|
|
|
@ -39,7 +39,7 @@ export default class Share extends Component {
|
|||
userId
|
||||
};
|
||||
|
||||
await axios.put(getUrl('rest/shares', data));
|
||||
await axios.put(getUrl('rest/shares'), data);
|
||||
this.sharesTable.refresh();
|
||||
this.usersTableSelect.refresh();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export default class UserShares extends Component {
|
|||
userId: this.props.user.id
|
||||
};
|
||||
|
||||
await axios.put(getUrl('rest/shares', data));
|
||||
await axios.put(getUrl('rest/shares'), data);
|
||||
for (const key in this.sharesTables) {
|
||||
this.sharesTables[key].refresh();
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ export default class CUD extends Component {
|
|||
|
||||
this.disableForm();
|
||||
|
||||
const response = await axios.post(getUrl('rest/html-to-text', { html }));
|
||||
const response = await axios.post(getUrl('rest/html-to-text'), { html });
|
||||
|
||||
this.updateFormValue('text', response.data.text);
|
||||
|
||||
|
|
|
@ -1,99 +1,2 @@
|
|||
/* Space out content a bit */
|
||||
|
||||
body {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* Everything but the jumbotron gets side spacing for mobile first views */
|
||||
|
||||
.header, .marketing, .footer {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
|
||||
/* Custom page header */
|
||||
|
||||
.header {
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
/* Make the masthead heading the same height as the navigation */
|
||||
|
||||
.header h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
|
||||
/* Custom page footer */
|
||||
|
||||
.footer {
|
||||
padding-top: 19px;
|
||||
color: #777;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
|
||||
/* Customize container */
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 730px;
|
||||
}
|
||||
}
|
||||
|
||||
.container-narrow > hr {
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
|
||||
/* Main marketing message and sign up button */
|
||||
|
||||
.jumbotron {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.jumbotron .btn {
|
||||
padding: 14px 24px;
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
|
||||
/* Supporting marketing content */
|
||||
|
||||
.marketing {
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
||||
.marketing p + h4 {
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
|
||||
/* Responsive: Portrait tablets and up */
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
/* Remove the padding we set earlier */
|
||||
.header, .marketing, .footer {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
/* Space out the masthead */
|
||||
.header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
/* Remove the bottom border on the jumbotron for visual effect */
|
||||
.jumbotron {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.gpg-text {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue