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 b7e40fe commit 4920cea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

### Changed
- Edit User pages will now warn editors when leaving the page with unsaved changes. ([#2832](https://github.com/craftcms/cms/issues/2832))
- Updated Garnish to 0.1.22.

### Fixed
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 @@ -33,7 +33,7 @@
{% block main %}
<div class="grid" data-max-cols="3">
<div class="item" data-position="left" data-colspan="2">
<form id="userform" class="pane" method="post" accept-charset="UTF-8" autocomplete="off" data-saveshortcut data-saveshortcut-redirect="{{ account.isCurrent() ? 'myaccount' : (CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users/{id}' : 'dashboard') }}">
<form id="userform" class="pane" method="post" accept-charset="UTF-8" autocomplete="off" data-saveshortcut data-saveshortcut-redirect="{{ account.isCurrent() ? 'myaccount' : (CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users/{id}' : 'dashboard') }}" data-confirm-unload>
<input type="hidden" name="action" value="users/saveUser">
<input type="hidden" name="redirect" value="{{ CraftEdition == CraftPro and currentUser.can('editUsers') ? 'users' : 'dashboard' }}">
{{ hiddenInputs }}
Expand Down

0 comments on commit 4920cea

Please # to comment.