diff --git a/src/Umbraco.Web.UI.Client/src/less/grid.less b/src/Umbraco.Web.UI.Client/src/less/grid.less index 5871412ee2..0c966573de 100644 --- a/src/Umbraco.Web.UI.Client/src/less/grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/grid.less @@ -155,7 +155,7 @@ body { } #speechbubble { - z-index: 1000; + z-index: 1060; position: absolute; bottom: 100px; left: 0; @@ -266,4 +266,4 @@ body { margin-left: 40px; width: 85%!important; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index fcdc683182..74010962f3 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -148,6 +148,11 @@ h5{ padding-top: 5px; margin-left: 240px; } + +.umb-user-panel .controls-row { + margin-left: 0px; +} + .controls-row label { display: inline-block } @@ -525,4 +530,4 @@ height:1px; margin: 10px 0; overflow: hidden; -} \ No newline at end of file +} 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..2002dc4ad9 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) { + .controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, historyService, eventsService, externalLoginInfo, authResource, currentUserResource, formHelper) { $scope.history = historyService.getCurrent(); $scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion; @@ -102,4 +102,44 @@ angular.module("umbraco") }); - }); \ No newline at end of file + //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); + + }); + } + }; + + }); 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..7bbc106f98 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 @@ -18,18 +18,25 @@
- -
+ + + +
External login providers
@@ -63,6 +70,24 @@
+
+
+ +

Change password

+ + + + + + + + +
+
+
    @@ -78,4 +103,4 @@ Umbraco version {{version}}
-
\ No newline at end of file +
diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/ChangePassword.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/ChangePassword.html index 9588ebd714..7008012a9e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/ChangePassword.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/ChangePassword.html @@ -3,15 +3,16 @@ ng-submit="changePassword()" val-form-manager> -

Change password

+

Change password

- + - diff --git a/src/Umbraco.Web.UI/config/Dashboard.config b/src/Umbraco.Web.UI/config/Dashboard.config index 93e510f7f8..a11286d6a5 100644 --- a/src/Umbraco.Web.UI/config/Dashboard.config +++ b/src/Umbraco.Web.UI/config/Dashboard.config @@ -75,11 +75,6 @@ views/dashboard/default/startupdashboardintro.html - - - views/dashboard/ChangePassword.html - -
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index cfcfca042a..5282df2253 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -923,6 +923,7 @@ Mange hilsner fra Umbraco robotten Brugertyper Forfatter Oversætter + Skift Din profil Din historik Session udløber diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 8f493d2582..582bb077ef 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -1057,6 +1057,7 @@ To manage your website, simply open the Umbraco back office and start adding con User types Writer Translator + Change Your profile Your recent history Session expires in diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 69c7e605da..c9dcd1554a 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -1055,6 +1055,7 @@ To manage your website, simply open the Umbraco back office and start adding con User types Writer Translator + Change Your profile Your recent history Session expires in diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml index 0320df479e..2d5e2c2e2c 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml @@ -985,6 +985,7 @@ Om een vertalingstaak te sluiten, ga aub naar het detailoverzicht en klik op de Gebruikerstype Gebruikerstypes Auteur + Wijzig Je profiel Je recente historie