Removed total and price fields used in dcl flow

This commit is contained in:
PCoder 2017-09-23 13:21:01 +05:30
parent 0bc2b22f62
commit 93d36306fb
3 changed files with 2 additions and 5 deletions

View file

@ -156,9 +156,7 @@
function _calcPricing() {
var total = (cardPricing['cpu'].value * 5) + (2 * cardPricing['ram'].value) + (0.6 * cardPricing['storage'].value);
total = parseFloat(total.toFixed(2));
$("#total").text(total);
$('input[name=total]').val(total);
}
function form_success() {
@ -192,4 +190,4 @@
});
})
}
})(jQuery);
})(jQuery);

View file

@ -77,7 +77,6 @@
{% endfor %}
</select>
</div>
<input type="hidden" name="total">
<!--<div class="description check-ip">
<input type="checkbox" name="ipv6"> Ipv6 Only<br>
</div>-->

View file

@ -275,7 +275,6 @@ class IndexView(CreateView):
memory_field = forms.IntegerField(validators=[self.validate_memory])
storage = request.POST.get('storage')
storage_field = forms.IntegerField(validators=[self.validate_storage])
price = request.POST.get('total')
template_id = int(request.POST.get('config'))
template = VMTemplate.objects.filter(
opennebula_vm_template_id=template_id).first()
@ -534,6 +533,7 @@ class OrderConfirmationView(DetailView):
disk_size = specs.get('disk_size')
amount_to_be_charged = get_vm_price(cpu=cpu, memory=memory,
disk_size=disk_size)
specs['price'] = amount_to_be_charged
plan_name = StripeUtils.get_stripe_plan_name(cpu=cpu,
memory=memory,
disk_size=disk_size)