CS-15900:InterVlan - UI - Confirmation Note on Acquisition of a Public IP Address to a VPC should mention this VPC instead of this Network

This commit is contained in:
Pranav Saxena 2012-08-08 20:14:11 +05:30
parent 1dab5371cd
commit ee22f88578
1 changed files with 8 additions and 2 deletions

View File

@ -153,6 +153,7 @@
};
var networkOfferingObjs = [];
var checkVpc=0;
cloudStack.sections.network = {
title: 'label.network',
@ -1098,17 +1099,22 @@
preFilter: function(args) {
if('networks' in args.context) { //from Guest Network section
if(args.context.networks[0].vpcid == null) //if it's a non-VPC network, show Acquire IP button
return true;
checkVpc=0;
return true;
else //if it's a VPC network, hide Acquire IP button
return false;
}
else { //from VPC section
checkVpc=1;
return true; //show Acquire IP button
}
},
messages: {
confirm: function(args) {
return 'message.acquire.new.ip';
if(checkVpc == 1)
return 'Please confirm that you would like to acquire a new IP for this VPC';
else
return 'message.acquire.new.ip';
},
notification: function(args) {
return 'label.acquire.new.ip';