mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🎨 Improved warning about authored posts being removed when deleting a user (#951)
closes TryGhost/Ghost#9405 - users were still not noticing the warning that a user's posts are deleted along with the user - improves the confirmation dialog layout to be clearer and even more explicit about authored posts being deleted along with the user
This commit is contained in:
parent
506b2a9388
commit
ba50290ca1
3 changed files with 17 additions and 5 deletions
|
@ -105,7 +105,7 @@
|
|||
|
||||
.modal-header {
|
||||
position: relative;
|
||||
margin-bottom: 18px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.modal-header h1 {
|
||||
|
|
|
@ -4,14 +4,26 @@
|
|||
<a class="close" href="" title="Close" {{action "closeModal"}}>{{inline-svg "close"}}<span class="hidden">Close</span></a>
|
||||
|
||||
<div class="modal-body">
|
||||
<p><strong>WARNING:</strong> You are about to delete the user '<strong>{{user.name}}</strong>'. There is no way to recover this.</p>
|
||||
{{#if user.count.posts}}
|
||||
<strong>WARNING:</strong> <span class="red">This user is the author of {{pluralize user.count.posts 'post'}}.</span> All posts and user data will be deleted. There is no way to recover this.
|
||||
<ul>
|
||||
<li>The user will not have access to this blog anymore</li>
|
||||
<li><strong>{{pluralize user.count.posts 'post'}}</strong> created by this user will be deleted</li>
|
||||
<li>All other user data will be deleted</li>
|
||||
</ul>
|
||||
{{else}}
|
||||
<strong>WARNING:</strong> All user data will be deleted. There is no way to recover this.
|
||||
<ul>
|
||||
<li>User will not have access to this blog anymore</li>
|
||||
<li>All user data will be deleted.</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button {{action "closeModal"}} class="gh-btn"><span>Cancel</span></button>
|
||||
{{gh-task-button "Delete" successText="Deleted" task=deleteUser class="gh-btn gh-btn-red gh-btn-icon"}}
|
||||
{{#if user.count.posts}}
|
||||
{{gh-task-button "Delete user and their posts" successText="Deleted" task=deleteUser class="gh-btn gh-btn-red gh-btn-icon"}}
|
||||
{{else}}
|
||||
{{gh-task-button "Delete user" successText="Deleted" task=deleteUser class="gh-btn gh-btn-red gh-btn-icon"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -431,7 +431,7 @@ describe('Acceptance: Team', function () {
|
|||
await click('button.delete');
|
||||
// user has posts so should warn about post deletion
|
||||
expect(
|
||||
find('.fullscreen-modal .modal-content:contains("is the author of 1 post")').length,
|
||||
find('.fullscreen-modal .modal-content:contains("1 post created by this user")').length,
|
||||
'deleting user with posts has post count'
|
||||
).to.equal(1);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue