1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Add flag icon on client profile

This commit is contained in:
RaidMax
2019-08-04 17:06:07 -05:00
parent 8bd67a1629
commit 38313ab184
14 changed files with 143 additions and 30 deletions

View File

@ -42,6 +42,7 @@ $(document).ready(function () {
$('#actionModal').trigger('action_form_received', actionType);
})
.fail(function (jqxhr, textStatus, error) {
$('#actionModal .modal-body-content').html('');
$('#actionModal .modal-message').text('Error — ' + error);
$('#actionModal').modal();
$('#actionModal .modal-message').fadeIn('fast');
@ -54,6 +55,7 @@ $(document).ready(function () {
$(document).on('submit', '.action-form', function (e) {
e.preventDefault();
$(this).append($('#target_id input'));
$('#actionModal').data('should-refresh', $('#actionModal').find('.refreshable').length !== 0);
const data = $(this).serialize();
showLoader();
$.get($(this).attr('action') + '/?' + data)
@ -102,4 +104,15 @@ $(document).ready(function () {
});
}
});
/*
* handle close event to refresh if need be
*/
$("#actionModal").on("hidden.bs.modal", function () {
let shouldRefresh = $(this).data('should-refresh');
if (shouldRefresh !== undefined && shouldRefresh) {
location.reload();
}
});
});