From 24fc2957c59206b76d3268ca817d16a06aa223bd Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 28 Mar 2019 17:53:02 +0300 Subject: [PATCH] * client: hide error if DHCP enabled and require check DHCP before enabling --- client/src/components/Settings/Dhcp/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/components/Settings/Dhcp/index.js b/client/src/components/Settings/Dhcp/index.js index 8480a5b5..4621011d 100644 --- a/client/src/components/Settings/Dhcp/index.js +++ b/client/src/components/Settings/Dhcp/index.js @@ -51,6 +51,7 @@ class Dhcp extends Component { onClick={() => this.handleToggle(config)} disabled={ !filledConfig + || !active || activeDhcpFound || processingDhcp || processingConfig @@ -95,7 +96,7 @@ class Dhcp extends Component { } getDhcpWarning = (active) => { - if (active && active.found === false) { + if (!active || (active && active.found === false)) { return ''; } @@ -154,8 +155,12 @@ class Dhcp extends Component { check_dhcp_servers - {this.getActiveDhcpMessage(t, dhcp.active)} - {this.getDhcpWarning(dhcp.active)} + {!enabled && + + {this.getActiveDhcpMessage(t, dhcp.active)} + {this.getDhcpWarning(dhcp.active)} + + } }