From 07f85a252b96f95c05b200027a448d5af83f7373 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Sat, 19 Sep 2020 14:20:19 +0100 Subject: [PATCH 1/5] First Edition Note: To transfer to my other computer for testing --- app/views/console/users/user.phtml | 47 +++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index 760e2b998..7e45d6d57 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -92,6 +92,51 @@
No user preferences found
+ +

Danger Zone

+ +
+

This is the area where you can delete this account.

+ +

By deleting this account you will lose all data associated with this account.

+ +

PLEASE NOTE: Account deletion is irreversible.

+ +
+ + + + +
+
@@ -165,7 +210,7 @@ data-analytics-event="submit" data-analytics-category="console" data-analytics-label="Delete User Session" - data-service="users.deleteSession" + data-service="users.updateStatus" data-event="submit" data-loading="Loading..." data-success="trigger" From d37bac2de22aecdf6e4059faffa1a58920019612 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 28 Sep 2020 14:34:16 +0100 Subject: [PATCH 2/5] Add delete user UI --- app/views/console/users/user.phtml | 71 ++++++++++++------------------ 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index 1dcb8e13f..b5950d120 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -92,51 +92,36 @@
No user preferences found
+
-

Danger Zone

+

Danger Zone

-
-

This is the area where you can delete this account.

- -

By deleting this account you will lose all data associated with this account.

- -

PLEASE NOTE: Account deletion is irreversible.

- -
- - - - -
-
+
+

This is the area where you can delete this account.

+ +

By deleting this account you will lose all data associated with this account.

+ +

PLEASE NOTE: Account deletion is irreversible.

+ +
+ + + +
From 4b36d07bca340a34e9e22d0f335ca3901e8df88e Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 28 Sep 2020 15:34:47 +0100 Subject: [PATCH 3/5] Update user.phtml --- app/views/console/users/user.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index b5950d120..d6976b4bd 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -97,11 +97,11 @@

Danger Zone

-

This is the area where you can delete this account.

+

This is the area where you can delete this user.

-

By deleting this account you will lose all data associated with this account.

+

By deleting this user you will lose all data associated with this user.

-

PLEASE NOTE: Account deletion is irreversible.

+

PLEASE NOTE: User deletion is irreversible.

Date: Mon, 28 Sep 2020 15:36:32 +0100 Subject: [PATCH 4/5] Also update button --- app/views/console/users/user.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index d6976b4bd..47bf6e763 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -120,7 +120,7 @@ data-failure-param-alert-classname="error"> - +
From cba1b081b642213d3780b082a093fd497f8c8107 Mon Sep 17 00:00:00 2001 From: "Eldad A. Fux" Date: Mon, 28 Sep 2020 18:40:31 +0300 Subject: [PATCH 5/5] Updated event name --- app/views/console/users/user.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/console/users/user.phtml b/app/views/console/users/user.phtml index 47bf6e763..12a25db25 100644 --- a/app/views/console/users/user.phtml +++ b/app/views/console/users/user.phtml @@ -113,7 +113,7 @@ data-success="alert,trigger,redirect" data-confirm="Are you sure you want to delete this user?" data-success-param-alert-text="Deleted user successfully" - data-success-param-trigger-events="users.update" + data-success-param-trigger-events="users.delete" data-success-param-redirect-url="/console/users?project={{router.params.project}}" data-failure="alert" data-failure-param-alert-text="Failed to delete user"