* client: hide error if DHCP enabled and require check DHCP before enabling
This commit is contained in:
parent
6ba0e4686a
commit
24fc2957c5
|
@ -51,6 +51,7 @@ class Dhcp extends Component {
|
||||||
onClick={() => this.handleToggle(config)}
|
onClick={() => this.handleToggle(config)}
|
||||||
disabled={
|
disabled={
|
||||||
!filledConfig
|
!filledConfig
|
||||||
|
|| !active
|
||||||
|| activeDhcpFound
|
|| activeDhcpFound
|
||||||
|| processingDhcp
|
|| processingDhcp
|
||||||
|| processingConfig
|
|| processingConfig
|
||||||
|
@ -95,7 +96,7 @@ class Dhcp extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDhcpWarning = (active) => {
|
getDhcpWarning = (active) => {
|
||||||
if (active && active.found === false) {
|
if (!active || (active && active.found === false)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,8 +155,12 @@ class Dhcp extends Component {
|
||||||
<Trans>check_dhcp_servers</Trans>
|
<Trans>check_dhcp_servers</Trans>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{this.getActiveDhcpMessage(t, dhcp.active)}
|
{!enabled &&
|
||||||
{this.getDhcpWarning(dhcp.active)}
|
<Fragment>
|
||||||
|
{this.getActiveDhcpMessage(t, dhcp.active)}
|
||||||
|
{this.getDhcpWarning(dhcp.active)}
|
||||||
|
</Fragment>
|
||||||
|
}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue