Handle message create vm request in js

This commit is contained in:
M.Ravi 2017-09-28 17:31:29 +02:00
parent c13015eabd
commit 03442398c2

View file

@ -87,15 +87,16 @@ $(document).ready(function() {
type: 'POST', type: 'POST',
data: create_vm_form.serialize(), data: create_vm_form.serialize(),
success: function (data) { success: function (data) {
fa_icon = $('.modal-icon > .fa');
$('#createvm-modal-title').text(data.msg_title);
$('#createvm-modal-body').text(data.msg_body);
$('#createvm-modal-done-btn')
.attr('href', data.redirect)
.removeClass('hide');
if (data.status === true) { if (data.status === true) {
fa_icon = $('.modal-icon > .fa');
fa_icon.attr('class', 'checkmark'); fa_icon.attr('class', 'checkmark');
// $('.modal-header > .close').removeClass('hidden'); } else {
$('#createvm-modal-title').text(data.msg_title); fa_icon.attr('class', 'fa fa-cross');
$('#createvm-modal-body').text(data.msg_body);
$('#createvm-modal-done-btn')
.attr('href', data.redirect)
.removeClass('hide');
} }
}, },
error: function (xmlhttprequest, textstatus, message) { error: function (xmlhttprequest, textstatus, message) {