| 1 |
<h3 class="hndle"><?php esc_html_e( 'General Settings', 'weforms' ); ?></h3> |
| 2 |
|
| 3 |
<div class="inside"> |
| 4 |
<p class="help"> |
| 5 |
<?php esc_html_e( 'For better email deliverability choose a email provider that will ensure the email reaches your inbox, as well as reducing your server load.', 'weforms' ); ?> |
| 6 |
</p> |
| 7 |
|
| 8 |
<table class="form-table"> |
| 9 |
<tr> |
| 10 |
<th><?php esc_html_e( 'Send Email Via', 'weforms' ); ?></th> |
| 11 |
<td> |
| 12 |
<select v-model="settings.email_gateway"> |
| 13 |
<option value="wordpress"><?php esc_html_e( 'WordPress', 'weforms' ); ?></option> |
| 14 |
<option value="sendgrid" :disabled="is_pro ? false : true"><?php esc_html_e( 'SendGrid', 'weforms' ); ?> <span v-if="!is_pro">(<?php esc_html_e( 'Premium', 'weforms' ); ?>)</span></option> |
| 15 |
<option value="mailgun" :disabled="is_pro ? false : true"><?php esc_html_e( 'Mailgun', 'weforms' ); ?> <span v-if="!is_pro">(<?php esc_html_e( 'Premium', 'weforms' ); ?>)</span></option> |
| 16 |
<option value="sparkpost" :disabled="is_pro ? false : true"><?php esc_html_e( 'SparkPost', 'weforms' ); ?> <span v-if="!is_pro">(<?php esc_html_e( 'Premium', 'weforms' ); ?>)</span></option> |
| 17 |
</select> |
| 18 |
</td> |
| 19 |
</tr> |
| 20 |
<template v-if="is_pro"> |
| 21 |
<tr v-if="settings.email_gateway == 'sendgrid'"> |
| 22 |
<th><?php esc_html_e( 'SendGrid API Key', 'weforms' ); ?></th> |
| 23 |
<td> |
| 24 |
<input type="text" v-model="settings.gateways.sendgrid" class="regular-text"> |
| 25 |
|
| 26 |
<p class="description"><?php printf( wp_kses_post( __( 'Fill your SendGrid <a href="%s" target="_blank">API Key</a>.', 'weforms') ), 'https://app.sendgrid.com/settings/api_keys' ); ?></p> |
| 27 |
</td> |
| 28 |
</tr> |
| 29 |
<tr v-if="settings.email_gateway == 'mailgun'"> |
| 30 |
<th><?php esc_html_e( 'Domain Name', 'weforms' ); ?></th> |
| 31 |
<td> |
| 32 |
<input type="text" v-model="settings.gateways.mailgun_domain" class="regular-text"> |
| 33 |
|
| 34 |
<p class="description"><?php esc_html_e( 'Your Mailgun domain name', 'weforms' ); ?></p> |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
<tr v-if="settings.email_gateway == 'mailgun'"> |
| 38 |
<th><?php esc_html_e( 'API Key', 'weforms' ); ?></th> |
| 39 |
<td> |
| 40 |
<input type="text" v-model="settings.gateways.mailgun" class="regular-text"> |
| 41 |
|
| 42 |
<p class="description"><?php printf( wp_kses_post( __( 'Fill your Mailgun <a href="%s" target="_blank">API Key</a>.', 'weforms' ) ), 'https://app.mailgun.com/app/account/security' ); ?></p> |
| 43 |
</td> |
| 44 |
</tr> |
| 45 |
<tr v-if="settings.email_gateway == 'sparkpost'"> |
| 46 |
<th><?php esc_html_e( 'SparkPost API Key', 'weforms' ); ?></th> |
| 47 |
<td> |
| 48 |
<input type="text" v-model="settings.gateways.sparkpost" class="regular-text"> |
| 49 |
|
| 50 |
<p class="description"><?php printf( wp_kses_post( 'Fill your SparkPost <a href="%s" target="_blank">API Key</a>.', 'weforms' ), 'https://app.sparkpost.com/account/credentials' ); ?></p> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
</template> |
| 54 |
<tr> |
| 55 |
<th><?php esc_html_e( 'Show Credit', 'weforms' ); ?></th> |
| 56 |
<td> |
| 57 |
<label> |
| 58 |
<input type="checkbox" v-model="settings.credit"> |
| 59 |
<?php wp_kses_post( 'Show <em>powered by weForms</em> credit in form footer.', 'weforms' ); ?> |
| 60 |
</label> |
| 61 |
</td> |
| 62 |
</tr> |
| 63 |
<tr> |
| 64 |
<th><?php esc_html_e( 'Enable No-Conflict Mode', 'weforms' ); ?></th> |
| 65 |
<td> |
| 66 |
<label> |
| 67 |
<input type="checkbox" v-model="settings.no_conflict"> |
| 68 |
<?php esc_html_e( 'Minimize conflict with other plugins in the backend.', 'weforms' ); ?> |
| 69 |
</label> |
| 70 |
</td> |
| 71 |
</tr> |
| 72 |
<tr> |
| 73 |
<th><?php esc_html_e( 'Show Credit in Email Footer', 'weforms' ); ?></th> |
| 74 |
<td> |
| 75 |
<label> |
| 76 |
<input :disabled="!is_pro" type="checkbox" v-model="settings.email_footer"> |
| 77 |
<?php esc_html_e( 'Show credit text in email footer.', 'weforms' ); ?> |
| 78 |
</label> |
| 79 |
<p v-if="!is_pro" class="description"><?php esc_html_e( 'Available in PRO version.', 'weforms' ); ?></p> |
| 80 |
</td> |
| 81 |
</tr> |
| 82 |
<tr> |
| 83 |
<th><?php esc_html_e( 'Form Permission', 'weforms' ); ?></th> |
| 84 |
<td> |
| 85 |
<select :disabled="!is_pro" v-model="settings.permission"> |
| 86 |
<option value="manage_options"><?php esc_html_e( 'Admins Only', 'weforms' ); ?></option> |
| 87 |
<option value="edit_others_posts"><?php esc_html_e( 'Admins, Editors', 'weforms' ); ?></option> |
| 88 |
<option value="publish_posts"><?php esc_html_e( 'Admins, Editors, Authors', 'weforms' ); ?></option> |
| 89 |
<option value="edit_posts"><?php esc_html_e( 'Admins, Editors, Authors, Contributors', 'weforms' ); ?></option> |
| 90 |
</select> |
| 91 |
|
| 92 |
<p v-if="!is_pro" class="description"><?php esc_html_e( 'Available in PRO version.', 'weforms' ); ?></p> |
| 93 |
<p v-else class="description"><?php esc_html_e( 'Which user roles can access and create forms, manage form submissions.', 'weforms' ); ?></p> |
| 94 |
</td> |
| 95 |
</tr> |
| 96 |
</table> |
| 97 |
</div> |
| 98 |
|
| 99 |
<div class="submit-wrapper"> |
| 100 |
<button v-on:click.prevent="saveSettings($event.target)" class="button button-primary"><?php esc_html_e( 'Save Changes', 'weforms' ); ?></button> |
| 101 |
</div> |
| 102 |
|