Skip to content

Commit f9fd132

Browse files
committed
CLOUDSTACK-2864: Fix duplicate message on affinity group
Fixes issue where text on affinity group step of instance wizard is duplicated, when going back a step and making changes.
1 parent 8319473 commit f9fd132

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎ui/scripts/ui-custom/instanceWizard.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,10 @@
489489
'affinity': function($step, formData) {
490490
return {
491491
response: {
492-
success: function(args) {
492+
success: function(args) {
493+
// Cleanup
494+
$step.find('.main-desc, p.no-affinity-groups').remove();
495+
493496
if (args.data.affinityGroups && args.data.affinityGroups.length) {
494497
$step.prepend(
495498
$('<div>').addClass('main-desc').append(
@@ -513,7 +516,9 @@
513516
)
514517
);
515518
} else {
516-
$step.find('.select-container').append($('<p>').html(_l('message.no.affinity.groups')));
519+
$step.find('.select-container').append(
520+
$('<p>').addClass('no-affinity-groups').html(_l('message.no.affinity.groups'))
521+
);
517522
}
518523
}
519524
}

0 commit comments

Comments
 (0)