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) { error: function (xmlhttprequest, textstatus, message) {
fa_icon = $('.modal-icon > .fa'); 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'); $('.modal-header > .close').attr('class', 'close');
if (typeof(create_vm_error_message) !== 'undefined') {
$('#createvm-modal-title').text(create_vm_error_message); $('#createvm-modal-title').text(create_vm_error_message);
}
$('#btn-create-vm').prop('disabled', false); $('#btn-create-vm').prop('disabled', false);
} }
}); });

View file

@ -202,7 +202,9 @@
<script type="text/javascript"> <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 () { window.onload = function () {
var locale_date = moment.utc(document.getElementById("order-created_at").textContent, 'YYYY-MM-DD HH:mm').toDate(); 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"); locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");