Fix instance wizard: service offering step

-Fix default radio button not always being selected, causing
 validation errors on creation
This commit is contained in:
Brian Federle 2011-12-01 14:42:52 -08:00
parent 9f49967365
commit 22c1da1372

View File

@ -230,9 +230,13 @@
'service-offering': function($step, formData) {
var originalValues = function(formData) {
$step.find('input[type=radio]').filter(function() {
return $(this).val() == formData.serviceofferingid;
}).click();
if (formData.serviceofferingid) {
$step.find('input[type=radio]').filter(function() {
return $(this).val() == formData.serviceofferingid;
}).click();
} else {
$step.find('input[type=radio]:first').click();
}
};
return {