From d64040f503aec94a61b0f3dcf9b75e4f0e49149a Mon Sep 17 00:00:00 2001
From: arknu
Date: Tue, 11 Nov 2014 17:12:18 +0100
Subject: [PATCH 1/5] U4-5523: Move Change password to user flyout
---
.../views/common/dialogs/user.controller.js | 44 ++++++++++++++++++-
.../src/views/common/dialogs/user.html | 26 ++++++++++-
2 files changed, 66 insertions(+), 4 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.controller.js
index 68579bb442..50fe203f2b 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.controller.js
@@ -1,5 +1,5 @@
-angular.module("umbraco")
- .controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, historyService, eventsService, externalLoginInfo, authResource) {
+angular.module("umbraco")
+ .controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, currentUserResource, historyService, eventsService, externalLoginInfo, authResource) {
$scope.history = historyService.getCurrent();
$scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion;
@@ -102,4 +102,44 @@ angular.module("umbraco")
});
+ //create the initial model for change password property editor
+ $scope.changePasswordModel = {
+ alias: "_umb_password",
+ view: "changepassword",
+ config: {},
+ value: {}
+ };
+
+ //go get the config for the membership provider and add it to the model
+ currentUserResource.getMembershipProviderConfig().then(function (data) {
+ $scope.changePasswordModel.config = data;
+ //ensure the hasPassword config option is set to true (the user of course has a password already assigned)
+ //this will ensure the oldPassword is shown so they can change it
+ $scope.changePasswordModel.config.hasPassword = true;
+ $scope.changePasswordModel.config.disableToggle = true;
+ });
+
+ ////this is the model we will pass to the service
+ //$scope.profile = {};
+
+ $scope.changePassword = function () {
+
+ if (formHelper.submitForm({ scope: $scope })) {
+ currentUserResource.changePassword($scope.changePasswordModel.value).then(function (data) {
+
+ //if the password has been reset, then update our model
+ if (data.value) {
+ $scope.changePasswordModel.value.generatedPassword = data.value;
+ }
+
+ formHelper.resetForm({ scope: $scope, notifications: data.notifications });
+
+ }, function (err) {
+
+ formHelper.handleError(err);
+
+ });
+ }
+ };
+
});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
index 8346acfabb..b87c17c7bc 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
@@ -73,9 +73,31 @@
-
+
+
+
Change password
+
+
Enter your current password, then repeat your new password to change it
+
+
+
Umbraco version {{version}}
-
+
\ No newline at end of file
From 88b1d1157586db71b046b263922f03099c3e5d8b Mon Sep 17 00:00:00 2001
From: arknu
Date: Thu, 13 Nov 2014 22:58:27 +0100
Subject: [PATCH 2/5] initial move of change password feature to user flyout,
still needs styling
---
src/Umbraco.Web.UI.Client/src/less/panel.less | 10 ++++++++++
.../src/views/common/dialogs/user.html | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less
index f86ba46f59..2bedd52ebd 100644
--- a/src/Umbraco.Web.UI.Client/src/less/panel.less
+++ b/src/Umbraco.Web.UI.Client/src/less/panel.less
@@ -274,7 +274,17 @@
display: none;
}
+//Change password form in user flyout
+//Styling overrides to avoid duplicating property editor code
+.umb-pane.change-password{
+ .control-label{
+ display: inline-block;
+ }
+ .controls-row{
+ margin-left:0;
+ }
+}
// Utility classes
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
index b87c17c7bc..ed5fc73892 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
@@ -29,8 +29,8 @@
-
-
+
+
External login providers
From ac4b151f119410e9a954f317b00583da8207fd52 Mon Sep 17 00:00:00 2001
From: arknu
Date: Tue, 17 Feb 2015 21:57:58 +0100
Subject: [PATCH 3/5] styling fixes for user flyout password form
---
src/Umbraco.Web.UI.Client/src/less/panel.less | 22 +++++++++++++++++--
src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++--
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less
index 2bedd52ebd..22d489915f 100644
--- a/src/Umbraco.Web.UI.Client/src/less/panel.less
+++ b/src/Umbraco.Web.UI.Client/src/less/panel.less
@@ -276,13 +276,31 @@
//Change password form in user flyout
//Styling overrides to avoid duplicating property editor code
-.umb-pane.change-password{
+.umb-panel-body .change-password{
+
+ .umb-pane{
+ margin:0;
+
+ }
+
.control-label{
display: inline-block;
+ width: 46%;
+ vertical-align: top;
}
.controls-row{
- margin-left:0;
+ margin-left:0 !important;
+ display: inline-block;
+ width: 47%;
+
+ input[type=text]{
+ width: 100%;
+ }
+ }
+
+ .umb-control-group{
+ padding-bottom: 0;
}
}
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index e12df98d43..9a93c6802c 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -2411,8 +2411,8 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
True
- True
- 7300
+ True
+ 7300
/
http://localhost:7300
False
From 6de9989285c81a7deac4edb6094ddea0cc2ab1bc Mon Sep 17 00:00:00 2001
From: arknu
Date: Tue, 17 Feb 2015 22:14:45 +0100
Subject: [PATCH 4/5] delete Change password tab from Dashboard.config
---
src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 2 +-
src/Umbraco.Web.UI/config/Dashboard.Release.config | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index 9a93c6802c..dce68bc63d 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -2410,7 +2410,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
- True
+ True
True
7300
/
diff --git a/src/Umbraco.Web.UI/config/Dashboard.Release.config b/src/Umbraco.Web.UI/config/Dashboard.Release.config
index b933000d0e..a1607fc88f 100644
--- a/src/Umbraco.Web.UI/config/Dashboard.Release.config
+++ b/src/Umbraco.Web.UI/config/Dashboard.Release.config
@@ -73,11 +73,6 @@
-
-
- views/dashboard/ChangePassword.html
-
-
From 0aacf6f8f447ab0cdc2a43980b8a742e6560435e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Asbj=C3=B8rn=20Riis-Knudsen?=
Date: Sun, 9 Aug 2015 22:37:36 +0200
Subject: [PATCH 5/5] Fix styling issues from merging
---
src/Umbraco.Web.UI.Client/src/less/panel.less | 3 ++-
src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less
index 22d489915f..e2bfc00f19 100644
--- a/src/Umbraco.Web.UI.Client/src/less/panel.less
+++ b/src/Umbraco.Web.UI.Client/src/less/panel.less
@@ -294,7 +294,8 @@
display: inline-block;
width: 47%;
- input[type=text]{
+ input[type=text],
+ input[type=password]{
width: 100%;
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
index ed5fc73892..94e94c0839 100644
--- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/user.html
@@ -74,7 +74,7 @@
-
+
Change password
Enter your current password, then repeat your new password to change it