Handle message create vm request in js
This commit is contained in:
parent
c13015eabd
commit
03442398c2
1 changed files with 8 additions and 7 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue