mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-03-14 17:48:14 -04:00
add cloudflare dns option to letsencrypt via manual certificate
This commit is contained in:
parent
2d7576c57e
commit
b9a95840e0
@ -20,6 +20,24 @@
|
|||||||
<input name="meta[letsencrypt_email]" type="email" class="form-control" placeholder="" value="<%- getLetsencryptEmail() %>" required>
|
<input name="meta[letsencrypt_email]" type="email" class="form-control" placeholder="" value="<%- getLetsencryptEmail() %>" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- CloudFlare -->
|
||||||
|
<div class="col-sm-12 col-md-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="custom-switch">
|
||||||
|
<input type="checkbox" class="custom-switch-input" name="use_cloudflare" value="1">
|
||||||
|
<span class="custom-switch-indicator"></span>
|
||||||
|
<span class="custom-switch-description"><%= i18n('ssl', 'use-cloudflare') %></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-12 cloudflare">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">CloudFlare DNS API Token <span class="form-required">*</span></label>
|
||||||
|
<input type="text" name="cloudflare_dns_api_token" class="form-control" id="input-domains" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="custom-switch">
|
<label class="custom-switch">
|
||||||
|
@ -20,10 +20,20 @@ module.exports = Mn.View.extend({
|
|||||||
save: 'button.save',
|
save: 'button.save',
|
||||||
other_certificate: '#other_certificate',
|
other_certificate: '#other_certificate',
|
||||||
other_certificate_key: '#other_certificate_key',
|
other_certificate_key: '#other_certificate_key',
|
||||||
other_intermediate_certificate: '#other_intermediate_certificate'
|
other_intermediate_certificate: '#other_intermediate_certificate',
|
||||||
|
cloudflare_switch: 'input[name="use_cloudflare"]',
|
||||||
|
cloudflare: '.cloudflare'
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
'change @ui.cloudflare_switch': function() {
|
||||||
|
let checked = this.ui.cloudflare_switch.prop('checked');
|
||||||
|
if (checked) {
|
||||||
|
this.ui.cloudflare.show();
|
||||||
|
} else {
|
||||||
|
this.ui.cloudflare.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
'click @ui.save': function (e) {
|
'click @ui.save': function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
@ -146,6 +156,7 @@ module.exports = Mn.View.extend({
|
|||||||
},
|
},
|
||||||
createFilter: /^(?:[^.*]+\.?)+[^.]$/
|
createFilter: /^(?:[^.*]+\.?)+[^.]$/
|
||||||
});
|
});
|
||||||
|
this.ui.cloudflare.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
|
@ -101,7 +101,8 @@
|
|||||||
"letsencrypt-email": "Email Address for Let's Encrypt",
|
"letsencrypt-email": "Email Address for Let's Encrypt",
|
||||||
"letsencrypt-agree": "I Agree to the <a href=\"{url}\" target=\"_blank\">Let's Encrypt Terms of Service</a>",
|
"letsencrypt-agree": "I Agree to the <a href=\"{url}\" target=\"_blank\">Let's Encrypt Terms of Service</a>",
|
||||||
"delete-ssl": "The SSL certificates attached will NOT be removed, they will need to be removed manually.",
|
"delete-ssl": "The SSL certificates attached will NOT be removed, they will need to be removed manually.",
|
||||||
"hosts-warning": "These domains must be already configured to point to this installation"
|
"hosts-warning": "These domains must be already configured to point to this installation",
|
||||||
|
"use-cloudflare": "Use CloudFlare DNS verification"
|
||||||
},
|
},
|
||||||
"proxy-hosts": {
|
"proxy-hosts": {
|
||||||
"title": "Proxy Hosts",
|
"title": "Proxy Hosts",
|
||||||
|
Loading…
Reference in New Issue
Block a user