From ba4f814d906efbeac1a23ca839faae8b063857dd Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Wed, 7 Dec 2011 19:54:38 -0800 Subject: [PATCH] Fix enable static NAT dialog Require VM selection, or pop-up error message -- prevents server call from being made without a required VM. --- ui/scripts/ui-custom/enableStaticNAT.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/scripts/ui-custom/enableStaticNAT.js b/ui/scripts/ui-custom/enableStaticNAT.js index 03e060743b7..f7caa6dc661 100644 --- a/ui/scripts/ui-custom/enableStaticNAT.js +++ b/ui/scripts/ui-custom/enableStaticNAT.js @@ -56,6 +56,14 @@ text: 'Apply', 'class': 'ok', click: function() { + if (!$dataList.find( + 'input[type=radio]:checked, input[type=checkbox]:checked' + ).size()) { + cloudStack.dialog.notice({ message: 'Please select an instance '}); + + return false; + } + var complete = args.complete; $dataList.fadeOut(function() {