diff --git a/project/templates/customer/profile/edit.html b/project/templates/customer/profile/edit.html index 518473e..10917c0 100644 --- a/project/templates/customer/profile/edit.html +++ b/project/templates/customer/profile/edit.html @@ -479,10 +479,22 @@ e.preventDefault(); var this_id = $(this).closest('.img_load').attr('id'); var tmb_id = 'id_tmb_' + this_id.substring(3); - $('#' + tmb_id).val(''); - $('#' + this_id + ' img').attr('src', '{{ STATIC_URL }}/img/upload-' + this_id + '.png'); - $('#' + this_id + '-clear_id').attr('checked', true); - $('#' + this_id + ' .del_image').hide(); + var dlg_msg = $('#dialog-message'); + dlg_msg.dialog({ + title: 'Удалить изображение?', + buttons:{'Да': function(){ + $('#' + tmb_id).val(''); + $('#' + this_id + ' img').attr('src', '{{ STATIC_URL }}/img/upload-' + this_id + '.png'); + $('#' + this_id + '-clear_id').attr('checked', true); + $('#' + this_id + ' .del_image').hide(); + dlg_msg.dialog('close'); + }, + 'Нет': function(){ + dlg_msg.dialog('close'); + } + } + }).html('Нажмите "Да", чтобы удалить изображение'); + dlg_msg.dialog('open'); }) var getPic = function(data){