From 7a7159d6bd728725cdc66fcda6681f835f9ce162 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Tue, 1 May 2018 14:10:24 -0700 Subject: [PATCH] Confirm unload on Edit User pages resolves #2832 --- CHANGELOG-v3.md | 5 +++++ src/templates/users/_edit.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md index 2624c138d56..341be8981bd 100644 --- a/CHANGELOG-v3.md +++ b/CHANGELOG-v3.md @@ -1,5 +1,10 @@ # Release Notes for Craft CMS 3.x +## Unreleased + +### Changed +- Edit User pages will now warn editors when leaving the page with unsaved changes. ([#2832](https://github.com/craftcms/cms/issues/2832)) + ## 3.0.5 - 2018-05-01 ### Changed diff --git a/src/templates/users/_edit.html b/src/templates/users/_edit.html index 925ca212181..4fd4497ded4 100644 --- a/src/templates/users/_edit.html +++ b/src/templates/users/_edit.html @@ -48,7 +48,7 @@ {% endblock %} {% block content %} -
+ {{ redirectInput(CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users' : 'dashboard') }} {{ hiddenInputs }}