diff --git a/README.md b/README.md index f338782b..9085c274 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ These are the steps to start Mailtrain via docker-compose: 4. Authenticate as `admin`:`test` -The instructions above use an automatically built Docker image on DockerHub (https://hub.docker.com/r/mailtrain/mailtrain). If you want to build the Docker image yourself (e.g. when doing development), use the `docker-compose-local-build.yml` located in the project's root directory. +The instructions above use an automatically built Docker image on DockerHub (https://hub.docker.com/r/mailtrain/mailtrain). If you want to build the Docker image yourself (e.g. when doing development), use the `docker-compose-local.yml` located in the project's root directory. ## License diff --git a/TODO.md b/TODO.md index e6827c53..6d063285 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,5 @@ +Note that some of these may be already obsolete... + ### Front page - Some dashboard diff --git a/client/src/campaigns/CUD.js b/client/src/campaigns/CUD.js index 6eac01ed..74585082 100644 --- a/client/src/campaigns/CUD.js +++ b/client/src/campaigns/CUD.js @@ -95,9 +95,7 @@ export default class CUD extends Component { onChange: { send_configuration: ::this.onSendConfigurationChanged }, - onChangeBeforeValidation: { - data_sourceCustom_type: ::this.onCustomTemplateTypeChanged - } + onChangeBeforeValidation: ::this.onFormChangeBeforeValidation }); } @@ -113,9 +111,18 @@ export default class CUD extends Component { return id; } - onCustomTemplateTypeChanged(mutStateData, key, oldType, type) { - if (type) { - this.templateTypes[type].afterTypeChange(mutStateData); + onFormChangeBeforeValidation(mutStateData, key, oldValue, newValue) { + let match; + + if (key === undefined || key === 'data_sourceCustom_type') { + if (newValue) { + this.templateTypes[newValue].afterTypeChange(mutStateData); + } + } + + if (key === undefined || (match = key.match(/^(lists_[0-9]+_)list$/))) { + const prefix = match[1]; + mutStateData.setIn([prefix + 'segment', 'value'], null); } } diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 44d08277..6914d668 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -95,7 +95,9 @@ queue: processes: 5 EOT -cat >> server/services/workers/reports/config/production.yaml < server/services/workers/reports/config/production.yaml <