From b48145c87fba33e3ea5c4d73dd0c78026d0529d2 Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 1 Oct 2020 09:31:23 +0200 Subject: [PATCH] Fix JS error preventing newly created dictionary items from opening automatically (cherry picked from commit 59f90bd08be677817133584fc877f4a53a349359) --- .../src/views/dictionary/dictionary.create.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js index 716d994809..03ffcfd09d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.create.controller.js @@ -15,7 +15,7 @@ function DictionaryCreateController($scope, $location, dictionaryResource, navig function createItem() { - if (formHelper.submitForm({ scope: $scope, formCtrl: this.createDictionaryForm })) { + if (formHelper.submitForm({ scope: $scope, formCtrl: $scope.createDictionaryForm })) { var node = $scope.currentNode; @@ -27,14 +27,14 @@ function DictionaryCreateController($scope, $location, dictionaryResource, navig navigationService.syncTree({ tree: "dictionary", path: currPath + "," + data, forceReload: true, activate: true }); // reset form state - formHelper.resetForm({ scope: $scope, formCtrl: this.createDictionaryForm }); + formHelper.resetForm({ scope: $scope, formCtrl: $scope.createDictionaryForm }); // navigate to edit view var currentSection = appState.getSectionState("currentSection"); $location.path("/" + currentSection + "/dictionary/edit/" + data); }, function (err) { - formHelper.resetForm({ scope: $scope, formCtrl: this.createDictionaryForm, hasErrors: true }); + formHelper.resetForm({ scope: $scope, formCtrl: $scope.createDictionaryForm, hasErrors: true }); if (err.data && err.data.message) { notificationsService.error(err.data.message); navigationService.hideMenu();