diff --git a/themes/grav/js/pages-all.js b/themes/grav/js/pages-all.js index 204345e0..12a7bc4a 100644 --- a/themes/grav/js/pages-all.js +++ b/themes/grav/js/pages-all.js @@ -70,7 +70,7 @@ $(function(){ if (action == 'continue') { $(window).off('beforeunload'); - window.location.href = '{{ uri.route(true) }}' + ((value == 'expert') ? '/expert:1' : ''); + window.location.href = $("#admin-mode-toggle input[name=mode-switch]:checked").data('leave-url'); } else { $('input[name=mode-switch][checked]').prop('checked', true); }