File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 20
20
<input name="meta[letsencrypt_email]" type="email" class="form-control" placeholder="" value="<%- getLetsencryptEmail() %>" required>
21
21
</div>
22
22
</div>
23
+
24
+ <!-- CloudFlare -->
25
+ <div class="col-sm-12 col-md-12">
26
+ <div class="form-group">
27
+ <label class="custom-switch">
28
+ <input type="checkbox" class="custom-switch-input" name="use_cloudflare" value="1">
29
+ <span class="custom-switch-indicator"></span>
30
+ <span class="custom-switch-description"><%= i18n('ssl', 'use-cloudflare') %></span>
31
+ </label>
32
+ </div>
33
+ </div>
34
+ <div class="col-sm-12 col-md-12 cloudflare">
35
+ <div class="form-group">
36
+ <label class="form-label">CloudFlare DNS API Token <span class="form-required">*</span></label>
37
+ <input type="text" name="cloudflare_dns_api_token" class="form-control" id="input-domains" required>
38
+ </div>
39
+ </div>
40
+
23
41
<div class="col-sm-12 col-md-12">
24
42
<div class="form-group">
25
43
<label class="custom-switch">
Original file line number Diff line number Diff line change @@ -20,10 +20,20 @@ module.exports = Mn.View.extend({
20
20
save: 'button.save',
21
21
other_certificate: '#other_certificate',
22
22
other_certificate_key: '#other_certificate_key',
23
- other_intermediate_certificate: '#other_intermediate_certificate'
23
+ other_intermediate_certificate: '#other_intermediate_certificate',
24
+ cloudflare_switch: 'input[name="use_cloudflare"]',
25
+ cloudflare: '.cloudflare'
24
26
},
25
27
26
28
events: {
29
+ 'change @ui.cloudflare_switch': function() {
30
+ let checked = this.ui.cloudflare_switch.prop('checked');
31
+ if (checked) {
32
+ this.ui.cloudflare.show();
33
+ } else {
34
+ this.ui.cloudflare.hide();
35
+ }
36
+ },
27
37
'click @ui.save': function (e) {
28
38
e.preventDefault();
29
39
@@ -146,6 +156,7 @@ module.exports = Mn.View.extend({
146
156
},
147
157
createFilter: /^(?:[^.*]+\.?)+[^.]$/
148
158
});
159
+ this.ui.cloudflare.hide();
149
160
},
150
161
151
162
initialize: function (options) {
Original file line number Diff line number Diff line change 101
101
"letsencrypt-email": "Email Address for Let's Encrypt",
102
102
"letsencrypt-agree": "I Agree to the <a href=\"{url}\" target=\"_blank\">Let's Encrypt Terms of Service</a>",
103
103
"delete-ssl": "The SSL certificates attached will NOT be removed, they will need to be removed manually.",
104
- "hosts-warning": "These domains must be already configured to point to this installation"
104
+ "hosts-warning": "These domains must be already configured to point to this installation",
105
+ "use-cloudflare": "Use CloudFlare DNS verification"
105
106
},
106
107
"proxy-hosts": {
107
108
"title": "Proxy Hosts",
You can’t perform that action at this time.
0 commit comments