diff options
-rw-r--r-- | src/static/js/dashboard.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/static/js/dashboard.js b/src/static/js/dashboard.js index 9bd20ef..85a337b 100644 --- a/src/static/js/dashboard.js +++ b/src/static/js/dashboard.js @@ -418,7 +418,7 @@ class MultipleSelectFilterWidget { cnt += required_resources[resource]; } - if (cnt > 1) { + if (cnt > 1 && hostname && image) { hostname.readOnly = true; image.disabled = true; } @@ -435,8 +435,11 @@ class MultipleSelectFilterWidget { this.available_resources[resource] += required_resources[resource]; } - hostname.readOnly = false; - image.disabled = false; + if (hostname && image) { + hostname.readOnly = false; + image.disabled = false; + } + this.updateAvailibility(); } |