Browse Source

only show sendMetrics checkbox if sending metrics is optional

pull/1/head
Jonathan Cobb 4 years ago
parent
commit
3c3ad9445b
2 changed files with 6 additions and 2 deletions
  1. +2
    -1
      src/_store/system.module.js
  2. +4
    -1
      src/account/NewNetworkPage.vue

+ 2
- 1
src/_store/system.module.js View File

@@ -12,7 +12,8 @@ const state = {
locales: ['en_US'],
cloudConfigs: {},
sslPort: null,
promoCodePolicy: null
promoCodePolicy: null,
requireSendMetrics: null
},
entityConfigs: {},
searchResults: [],


+ 4
- 1
src/account/NewNetworkPage.vue View File

@@ -207,7 +207,7 @@
<hr/>

<!-- error and metrics reporting -->
<div class="form-group">
<div class="form-group" v-if="configs.requireSendMetrics && configs.requireSendMetrics !== true">
<label for="sendMetrics">{{messages.field_label_send_metrics}}</label>
<input type="checkbox" id="sendMetrics" v-model="accountPlan.sendMetrics">
<div v-if="submitted && errors.has('sendMetrics')" class="invalid-feedback d-block">{{ errors.first('sendMetrics') }}</div>
@@ -531,6 +531,9 @@
if (cloudRegion === null) {
this.errors.add({field: 'region', msg: this.messages['err_region_notFound']});
} else {
if (this.configs.requireSendMetrics) {
this.accountPlan.sendMetrics = true;
}
this.addPlanAndStartNetwork({
userId: this.user.uuid,
accountPlan: this.accountPlan,


Loading…
Cancel
Save