* client: hide error if DHCP enabled and require check DHCP before enabling

This commit is contained in:
Ildar Kamalov 2019-03-28 17:53:02 +03:00 committed by Simon Zolin
parent 6ba0e4686a
commit 24fc2957c5
1 changed files with 8 additions and 3 deletions

View File

@ -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 {
<Trans>check_dhcp_servers</Trans>
</button>
</div>
{this.getActiveDhcpMessage(t, dhcp.active)}
{this.getDhcpWarning(dhcp.active)}
{!enabled &&
<Fragment>
{this.getActiveDhcpMessage(t, dhcp.active)}
{this.getDhcpWarning(dhcp.active)}
</Fragment>
}
</Fragment>
}
</div>