diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index 76bc6b5..01530ae 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -94,7 +94,11 @@ def edit_route_ajax(request): return JsonResponse({'errors': msg}) html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request) - return JsonResponse({'html': html}, status=200) + resDict = { + 'html': html, + 'btn_title': _('Сохранить изменения') + } + return JsonResponse(resDict, status=200) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 30232d4..9ec9751 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -796,7 +796,7 @@ function editRoute(id) { document.querySelector(".info_profile").innerHTML = data.html; if(data.html){ let changeTextButton = document.getElementById('registration') - changeTextButton.innerText = 'Сохранить изменения' + changeTextButton.innerText = data.btn_title window.scrollTo({ top: 0, left: 0,