Added translation and fa-times icon

This commit is contained in:
PCoder 2017-09-16 15:35:31 +05:30
parent 7256160a7b
commit 155a4b7cb6
2 changed files with 8 additions and 4 deletions

View file

@ -20,9 +20,11 @@ $(document).ready(function () {
},
error: function (xmlhttprequest, textstatus, message) {
fa_icon = $('.modal-icon > .fa');
fa_icon.attr('class', 'fa fa-error');
fa_icon.attr('class', 'fa fa-times');
$('.modal-header > .close').attr('class', 'close');
$('#createvm-modal-title').text(create_vm_error_message);
if (typeof(create_vm_error_message) !== 'undefined') {
$('#createvm-modal-title').text(create_vm_error_message);
}
$('#btn-create-vm').prop('disabled', false);
}
});
@ -43,4 +45,4 @@ $(document).ready(function () {
$('html,body').scrollTop(scrollmem);
});
});
});

View file

@ -202,7 +202,9 @@
<script type="text/javascript">
var create_vm_error_message = "Some problem encountered. Please try later.";
{% trans "Some problem encountered. Please try again later." as err_msg %}
var create_vm_error_message = '{{err_msg|safe}}.';
window.onload = function () {
var locale_date = moment.utc(document.getElementById("order-created_at").textContent, 'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");