Skip to content

Commit

Permalink
Confirm unload on Edit User pages
Browse files Browse the repository at this point in the history
resolves #2832
  • Loading branch information
brandonkelly committed May 1, 2018
1 parent 610f7ac commit 7a7159d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/templates/users/_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{% endblock %}

{% block content %}
<form id="userform" method="post" accept-charset="UTF-8" autocomplete="off" data-saveshortcut data-saveshortcut-redirect="{{ (user.getIsCurrent() ? 'myaccount' : (CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users/{id}' : 'dashboard'))|hash }}">
<form id="userform" method="post" accept-charset="UTF-8" autocomplete="off" data-saveshortcut data-saveshortcut-redirect="{{ (user.getIsCurrent() ? 'myaccount' : (CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users/{id}' : 'dashboard'))|hash }}" data-confirm-unload>
<input type="hidden" name="action" value="users/save-user">
{{ redirectInput(CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users' : 'dashboard') }}
{{ hiddenInputs }}
Expand Down

0 comments on commit 7a7159d

Please # to comment.