From 411734f392edb55904100a44c2f1e35eee7aabba Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Tue, 13 Nov 2018 20:51:55 +1000 Subject: [PATCH] Fix unsetting http2_support --- src/frontend/js/app/nginx/dead/form.js | 4 ++-- src/frontend/js/app/nginx/proxy/form.js | 6 +++--- src/frontend/js/app/nginx/redirection/form.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/js/app/nginx/dead/form.js b/src/frontend/js/app/nginx/dead/form.js index 24d783c7..2c2acaf3 100644 --- a/src/frontend/js/app/nginx/dead/form.js +++ b/src/frontend/js/app/nginx/dead/form.js @@ -59,8 +59,8 @@ module.exports = Mn.View.extend({ data.ssl_forced = true; } - if (typeof data.http2_support !== 'undefined' && data.http2_support === '1') { - data.http2_support = true; + if (typeof data.http2_support !== 'undefined') { + data.http2_support = !!data.http2_support; } if (typeof data.domain_names === 'string' && data.domain_names) { diff --git a/src/frontend/js/app/nginx/proxy/form.js b/src/frontend/js/app/nginx/proxy/form.js index 15bc63ba..ee030c15 100644 --- a/src/frontend/js/app/nginx/proxy/form.js +++ b/src/frontend/js/app/nginx/proxy/form.js @@ -44,7 +44,7 @@ module.exports = Mn.View.extend({ .parents('.form-group') .css('opacity', enabled ? 1 : 0.5); - this.ui.http2_support.prop('disabled', !enabled) + this.ui.http2_support.prop('disabled', !enabled); }, 'click @ui.save': function (e) { @@ -68,8 +68,8 @@ module.exports = Mn.View.extend({ data.ssl_forced = true; } - if (typeof data.http2_support !== 'undefined' && data.http2_support === '1') { - data.http2_support = true; + if (typeof data.http2_support !== 'undefined') { + data.http2_support = !!data.http2_support; } if (typeof data.domain_names === 'string' && data.domain_names) { diff --git a/src/frontend/js/app/nginx/redirection/form.js b/src/frontend/js/app/nginx/redirection/form.js index 3cad2bd1..e5950522 100644 --- a/src/frontend/js/app/nginx/redirection/form.js +++ b/src/frontend/js/app/nginx/redirection/form.js @@ -62,8 +62,8 @@ module.exports = Mn.View.extend({ data.ssl_forced = true; } - if (typeof data.http2_support !== 'undefined' && data.http2_support === '1') { - data.http2_support = true; + if (typeof data.http2_support !== 'undefined') { + data.http2_support = !!data.http2_support; } if (typeof data.domain_names === 'string' && data.domain_names) {