diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6caeadd0e5..9dc6f9457f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,7 +16,7 @@ This document gives you a quick overview on how to get started, we will link to ## Guidelines for contributions we welcome -Not all changes are wanted, so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valueable time. +Not all changes are wanted, so on occassion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valuable time. We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md). Make sure to talk to us before making large changes. diff --git a/src/Umbraco.Web.UI.Client/src/less/helveticons.less b/src/Umbraco.Web.UI.Client/src/less/helveticons.less index 60ccd3c357..1083a490e0 100644 --- a/src/Umbraco.Web.UI.Client/src/less/helveticons.less +++ b/src/Umbraco.Web.UI.Client/src/less/helveticons.less @@ -17,12 +17,14 @@ -webkit-font-smoothing: antialiased; *margin-right: .3em; } + [class^="icon-"]:before, [class*=" icon-"]:before { text-decoration: inherit; display: inline-block; speak: none; } + /* [class^="icon-"]:before, [class*=" icon-"]:before { font-family: 'icomoon'; @@ -38,7 +40,6 @@ i.large{ font-size: 32px; } - i.medium{ font-size: 24px; } @@ -187,8 +188,6 @@ i.small{ .icon-umb-translation:before, .traytranslation:before { content: "\e1fd"; } - - .icon-tv:before { content: "\e02e"; } @@ -213,7 +212,8 @@ i.small{ .icon-train:before { content: "\e035"; } -.icon-trafic:before { +.icon-trafic:before, +.icon-traffic:before { content: "\e036"; } .icon-traffic-alt:before { @@ -255,6 +255,7 @@ i.small{ .icon-target:before { content: "\e043"; } +.icon-temperature-alt:before, .icon-temperatrure-alt:before { content: "\e044"; } @@ -267,6 +268,7 @@ i.small{ .icon-theater:before { content: "\e047"; } +.icon-thief:before, .icon-theif:before { content: "\e048"; } @@ -375,6 +377,7 @@ i.small{ .icon-shuffle:before { content: "\e06b"; } +.icon-science:before, .icon-sience:before { content: "\e06c"; } @@ -747,6 +750,7 @@ i.small{ .icon-pictures-alt-2:before { content: "\e0e7"; } +.icon-panel-close:before, .icon-pannel-close:before { content: "\e0e8"; } @@ -1627,6 +1631,7 @@ i.small{ .icon-alarm-clock:before { content: "\e20c"; } +.icon-addressbook:before, .icon-adressbook:before { content: "\e20d"; } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.notify.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.notify.controller.js index 4c446b11e0..9f59fba0ea 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.notify.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.notify.controller.js @@ -3,7 +3,8 @@ $scope, contentResource, navigationService, - angularHelper) { + angularHelper, + localizationService) { var vm = this; var currentForm; vm.notifyOptions = []; @@ -11,7 +12,8 @@ vm.cancel = cancel; vm.message = { name: $scope.currentNode.name - };; + }; + vm.labels = {}; function onInit() { vm.loading = true; contentResource.getNotifySettingsById($scope.currentNode.id).then(function (options) { @@ -19,6 +21,9 @@ vm.loading = false; vm.notifyOptions = options; }); + localizationService.localize("notifications_editNotifications", [$scope.currentNode.name]).then(function(value) { + vm.labels.headline = value; + }); } function cancel() { navigationService.hideMenu(); diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index 8f6d5d3e6d..0ebe577ed8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -12,13 +12,16 @@
{{source.name}} was copied to + was copied to {{target.name}}

- Choose where to copy {{source.name}} to in the tree structure below + Choose where to copy + {{source.name}} + to in the tree structure below

diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index b655917f6f..49df26848d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -11,7 +11,9 @@
- {{source.name}} was moved underneath {{target.name}} + {{source.name}} + was moved to + {{target.name}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/notify.html b/src/Umbraco.Web.UI.Client/src/views/content/notify.html index e7c4d4d785..8e2f860661 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/notify.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/notify.html @@ -13,13 +13,13 @@
- {{currentNode.name}} + {{currentNode.name}}
- Set your notification for {{ currentNode.name }} +
- {{source.name}} was moved underneath {{target.name}} + {{source.name}} + was moved to + {{target.name}}
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 8d8ac8e506..383dc855fd 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -32,8 +32,11 @@ Omdøb Gendan Sæt rettigheder for siden %0% + Vælg hvor du vil kopiere Vælg hvortil du vil flytte - I træstrukturen nedenfor + til i træstrukturen nedenfor + blev flyttet til + blev kopieret til Rettigheder Fortryd ændringer Send til udgivelse @@ -772,7 +775,8 @@ Relater det kopierede element til originalen - Rediger dine notificeringer for %0% + %0%]]> + Notificeringer er gemt for Fortryd + Vælg en version at sammenligne med den nuværende version Nuværende version Rød tekst vil ikke blive vist i den valgte version. Grøn betyder tilføjet]]> Dokument tilbagerullet diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index cc4e694b3c..69f106a775 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -33,8 +33,11 @@ Rename Restore Set permissions for the page %0% + Choose where to copy Choose where to move - In the tree structure below + to in the tree structure below + was moved to + was copied to Permissions Rollback Send To Publish @@ -942,7 +945,8 @@ To manage your website, simply open the Umbraco back office and start adding con Relate copied items to original - Edit your notification for %0% + %0%]]> + Notification settings saved for Undo edits + Select a version to compare with the current version Current version Red text will not be shown in the selected version. , green means added]]> Document has been rolled back 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 3235aadac4..dcf62becb5 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -33,8 +33,11 @@ Rename Restore Set permissions for the page %0% + Choose where to copy Choose where to move - In the tree structure below + to in the tree structure below + was moved to + was copied to Permissions Rollback Send To Publish @@ -967,7 +970,8 @@ To manage your website, simply open the Umbraco back office and start adding con Relate copied items to original - Edit your notification for %0% + %0%]]> + Notification settings saved for Undo edits + Select a version to compare with the current version Current version Red text will not be shown in the selected version. , green means added]]> Document has been rolled back @@ -2019,10 +2024,6 @@ To manage your website, simply open the Umbraco back office and start adding con There is no 'restore' relation found for this node. Use the Move menu item to move it manually. The item you want to restore it under ('%0%') is in the recycle bin. Use the Move menu item to move the item manually. - - Select your notifications for - Notification settings saved for - Direction Parent to child diff --git a/src/Umbraco.Web/Editors/LogController.cs b/src/Umbraco.Web/Editors/LogController.cs index dcd69d10b7..cc15b27977 100644 --- a/src/Umbraco.Web/Editors/LogController.cs +++ b/src/Umbraco.Web/Editors/LogController.cs @@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors long totalRecords; var dateQuery = sinceDate.HasValue ? SqlContext.Query().Where(x => x.CreateDate >= sinceDate) : null; var result = Services.AuditService.GetPagedItemsByEntity(id, pageNumber - 1, pageSize, out totalRecords, orderDirection, customFilter: dateQuery); - var mapped = Mapper.Map>(result); + var mapped = result.Select(item => Mapper.Map(item)); var page = new PagedResult(totalRecords, pageNumber, pageSize) { @@ -56,11 +56,12 @@ namespace Umbraco.Web.Editors private IEnumerable MapAvatarsAndNames(IEnumerable items) { - var userIds = items.Select(x => x.UserId).ToArray(); + var mappedItems = items.ToList(); + var userIds = mappedItems.Select(x => x.UserId).ToArray(); var userAvatars = Services.UserService.GetUsersById(userIds) .ToDictionary(x => x.Id, x => x.GetUserAvatarUrls(ApplicationCache.RuntimeCache)); var userNames = Services.UserService.GetUsersById(userIds).ToDictionary(x => x.Id, x => x.Name); - foreach (var item in items) + foreach (var item in mappedItems) { if (userAvatars.TryGetValue(item.UserId, out var avatars)) { @@ -73,7 +74,7 @@ namespace Umbraco.Web.Editors } - return items; + return mappedItems; } } } diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs index 54c3d12ea9..6777ae1f56 100644 --- a/src/Umbraco.Web/Editors/PasswordChanger.cs +++ b/src/Umbraco.Web/Editors/PasswordChanger.cs @@ -96,7 +96,7 @@ namespace Umbraco.Web.Editors { var errors = string.Join(". ", resetResult.Errors); _logger.Warn("Could not reset user password {PasswordErrors}", errors); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not reset password, errors: " + errors, new[] { "resetPassword" }) }); + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "resetPassword" }) }); } return Attempt.Succeed(new PasswordChangedModel()); @@ -116,21 +116,30 @@ namespace Umbraco.Web.Editors return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "oldPassword" }) }); } - if (passwordModel.OldPassword.IsNullOrWhiteSpace() == false) + //get the user + var backOfficeIdentityUser = await userMgr.FindByIdAsync(savingUser.Id); + if (backOfficeIdentityUser == null) { - //if an old password is suplied try to change it - var changeResult = await userMgr.ChangePasswordAsync(savingUser.Id, passwordModel.OldPassword, passwordModel.NewPassword); - if (changeResult.Succeeded == false) - { - var errors = string.Join(". ", changeResult.Errors); - _logger.Warn("Could not change user password {PasswordErrors}", errors); - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, errors: " + errors, new[] { "oldPassword" }) }); - } - return Attempt.Succeed(new PasswordChangedModel()); + //this really shouldn't ever happen... but just in case + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password could not be verified", new[] { "oldPassword" }) }); } - - //We shouldn't really get here - return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid information supplied", new[] { "value" }) }); + //is the old password correct? + var validateResult = await userMgr.CheckPasswordAsync(backOfficeIdentityUser, passwordModel.OldPassword); + if(validateResult == false) + { + //no, fail with an error message for "oldPassword" + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Incorrect password", new[] { "oldPassword" }) }); + } + //can we change to the new password? + var changeResult = await userMgr.ChangePasswordAsync(savingUser.Id, passwordModel.OldPassword, passwordModel.NewPassword); + if (changeResult.Succeeded == false) + { + //no, fail with error messages for "password" + var errors = string.Join(". ", changeResult.Errors); + _logger.Warn("Could not change user password {PasswordErrors}", errors); + return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "password" }) }); + } + return Attempt.Succeed(new PasswordChangedModel()); } ///