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.
This commit is contained in:
Brian Federle 2013-07-12 12:04:57 -07:00
parent 8319473baa
commit f9fd132031
1 changed files with 7 additions and 2 deletions

View File

@ -489,7 +489,10 @@
'affinity': function($step, formData) {
return {
response: {
success: function(args) {
success: function(args) {
// Cleanup
$step.find('.main-desc, p.no-affinity-groups').remove();
if (args.data.affinityGroups && args.data.affinityGroups.length) {
$step.prepend(
$('<div>').addClass('main-desc').append(
@ -513,7 +516,9 @@
)
);
} else {
$step.find('.select-container').append($('<p>').html(_l('message.no.affinity.groups')));
$step.find('.select-container').append(
$('<p>').addClass('no-affinity-groups').html(_l('message.no.affinity.groups'))
);
}
}
}