Added mail provider API key setting

no issue
This commit is contained in:
Rish 2019-11-05 17:26:25 +07:00
parent caff822706
commit f6660d9116
2 changed files with 16 additions and 0 deletions

View File

@ -23,6 +23,7 @@ export default Component.extend({
subscriptionSettings.stripeConfig = stripeProcessor.config;
subscriptionSettings.allowSelfSignup = !!subscriptionSettings.allowSelfSignup;
subscriptionSettings.fromAddress = subscriptionSettings.fromAddress || '';
subscriptionSettings.mailgunApiKey = subscriptionSettings.mailgunApiKey || '';
return subscriptionSettings;
}),
@ -65,6 +66,9 @@ export default Component.extend({
if (key === 'fromAddress') {
subscriptionSettings.fromAddress = event.target.value;
}
if (key === 'mailgunApiKey') {
subscriptionSettings.mailgunApiKey = event.target.value;
}
this.setMembersSubscriptionSettings(subscriptionSettings);
}
},

View File

@ -185,6 +185,18 @@
</div>
<div class="f8 fw4 midgrey mt1">Your members will receive system emails from this address</div>
{{/gh-form-group}}
{{#gh-form-group}}
<label class="fw6 f8">Mailgun API key</label>
{{gh-text-input
type="password"
value=(readonly subscriptionSettings.mailgunApiKey)
input=(action "setSubscriptionSettings" "mailgunApiKey")
class="mt1 password"
}}
<a href="https://help.mailgun.com/hc/en-us/articles/203380100-Where-Can-I-Find-My-API-Key-and-SMTP-Credentials-" target="_blank" class="mt1 fw4 f8">
Find your Mailgun API keys here &raquo;
</a>
{{/gh-form-group}}
</div>
{{/liquid-if}}
</section>