mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	Merge branch 'master' of github.com:jc21/nginx-proxy-manager into develop
This commit is contained in:
		| @@ -60,7 +60,7 @@ | |||||||
|                             <div class="form-label"><%- i18n('certificates', 'other-certificate-key') %><span class="form-required">*</span></div> |                             <div class="form-label"><%- i18n('certificates', 'other-certificate-key') %><span class="form-required">*</span></div> | ||||||
|                             <div class="custom-file"> |                             <div class="custom-file"> | ||||||
|                                 <input type="file" class="custom-file-input" name="meta[other_certificate_key]" id="other_certificate_key" required> |                                 <input type="file" class="custom-file-input" name="meta[other_certificate_key]" id="other_certificate_key" required> | ||||||
|                                 <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label> |                                 <label id="other_certificate_key_label" class="custom-file-label"><%- i18n('str', 'choose-file') %></label> | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
| @@ -69,7 +69,7 @@ | |||||||
|                             <div class="form-label"><%- i18n('certificates', 'other-certificate') %><span class="form-required">*</span></div> |                             <div class="form-label"><%- i18n('certificates', 'other-certificate') %><span class="form-required">*</span></div> | ||||||
|                             <div class="custom-file"> |                             <div class="custom-file"> | ||||||
|                                 <input type="file" class="custom-file-input" name="meta[other_certificate]" id="other_certificate"> |                                 <input type="file" class="custom-file-input" name="meta[other_certificate]" id="other_certificate"> | ||||||
|                                 <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label> |                                 <label id="other_certificate_label" class="custom-file-label"><%- i18n('str', 'choose-file') %></label> | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
| @@ -78,7 +78,7 @@ | |||||||
|                             <div class="form-label"><%- i18n('certificates', 'other-intermediate-certificate') %></div> |                             <div class="form-label"><%- i18n('certificates', 'other-intermediate-certificate') %></div> | ||||||
|                             <div class="custom-file"> |                             <div class="custom-file"> | ||||||
|                                 <input type="file" class="custom-file-input" name="meta[other_intermediate_certificate]" id="other_intermediate_certificate"> |                                 <input type="file" class="custom-file-input" name="meta[other_intermediate_certificate]" id="other_intermediate_certificate"> | ||||||
|                                 <label class="custom-file-label"><%- i18n('str', 'choose-file') %></label> |                                 <label id="other_intermediate_certificate_label" class="custom-file-label"><%- i18n('str', 'choose-file') %></label> | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|   | |||||||
| @@ -13,19 +13,22 @@ module.exports = Mn.View.extend({ | |||||||
|     max_file_size: 102400, |     max_file_size: 102400, | ||||||
|  |  | ||||||
|     ui: { |     ui: { | ||||||
|         form:                           'form', |         form:                                 'form', | ||||||
|         domain_names:                   'input[name="domain_names"]', |         domain_names:                         'input[name="domain_names"]', | ||||||
|         buttons:                        '.modal-footer button', |         buttons:                              '.modal-footer button', | ||||||
|         cancel:                         'button.cancel', |         cancel:                               'button.cancel', | ||||||
|         save:                           'button.save', |         save:                                 'button.save', | ||||||
|         other_certificate:              '#other_certificate', |         other_certificate:                    '#other_certificate', | ||||||
|         other_certificate_key:          '#other_certificate_key', |         other_certificate_label:              '#other_certificate_label', | ||||||
|         other_intermediate_certificate: '#other_intermediate_certificate', |         other_certificate_key:                '#other_certificate_key', | ||||||
|         cloudflare_switch:              'input[name="meta[cloudflare_use]"]', |         cloudflare_switch:                    'input[name="meta[cloudflare_use]"]', | ||||||
|         cloudflare_token:               'input[name="meta[cloudflare_token]"', |         cloudflare_token:                     'input[name="meta[cloudflare_token]"', | ||||||
|         cloudflare:                     '.cloudflare' |         cloudflare:                           '.cloudflare', | ||||||
|  |         other_certificate_key_label:          '#other_certificate_key_label', | ||||||
|  |         other_intermediate_certificate:       '#other_intermediate_certificate', | ||||||
|  |         other_intermediate_certificate_label: '#other_intermediate_certificate_label' | ||||||
|     }, |     }, | ||||||
|  |      | ||||||
|     events: { |     events: { | ||||||
|         'change @ui.cloudflare_switch': function() { |         'change @ui.cloudflare_switch': function() { | ||||||
|             let checked = this.ui.cloudflare_switch.prop('checked'); |             let checked = this.ui.cloudflare_switch.prop('checked'); | ||||||
| @@ -155,9 +158,20 @@ module.exports = Mn.View.extend({ | |||||||
|                     this.ui.buttons.prop('disabled', false).removeClass('btn-disabled'); |                     this.ui.buttons.prop('disabled', false).removeClass('btn-disabled'); | ||||||
|                     this.ui.save.removeClass('btn-loading'); |                     this.ui.save.removeClass('btn-loading'); | ||||||
|                 }); |                 }); | ||||||
|  |         }, | ||||||
|  |         'change @ui.other_certificate_key': function(e){ | ||||||
|  |             this.setFileName("other_certificate_key_label", e) | ||||||
|  |         }, | ||||||
|  |         'change @ui.other_certificate': function(e){ | ||||||
|  |             this.setFileName("other_certificate_label", e) | ||||||
|  |         }, | ||||||
|  |         'change @ui.other_intermediate_certificate': function(e){ | ||||||
|  |             this.setFileName("other_intermediate_certificate_label", e) | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|  |     setFileName(ui, e){ | ||||||
|  |         this.getUI(ui).text(e.target.files[0].name) | ||||||
|  |     }, | ||||||
|     templateContext: { |     templateContext: { | ||||||
|         getLetsencryptEmail: function () { |         getLetsencryptEmail: function () { | ||||||
|             return typeof this.meta.letsencrypt_email !== 'undefined' ? this.meta.letsencrypt_email : App.Cache.User.get('email'); |             return typeof this.meta.letsencrypt_email !== 'undefined' ? this.meta.letsencrypt_email : App.Cache.User.get('email'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user