From 4ecbb7abe66b81e6f74a0c430caed45c3427deb0 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Fri, 4 Sep 2020 10:46:56 +0200 Subject: [PATCH] Fix JS errors when creating folders in the settings section --- .../src/views/datatypes/create.controller.js | 6 +++--- src/Umbraco.Web.UI.Client/src/views/datatypes/create.html | 4 ++-- .../src/views/documenttypes/create.controller.js | 6 +++--- .../src/views/documenttypes/create.html | 4 ++-- .../src/views/mediatypes/create.controller.js | 6 +++--- src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js index 9bc602678edd..11c12392f6fd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.controller.js @@ -21,18 +21,18 @@ function DataTypeCreateController($scope, $location, navigationService, dataType } $scope.createContainer = function () { - if (formHelper.submitForm({ scope: $scope, formCtrl: this.createFolderForm })) { + if (formHelper.submitForm({ scope: $scope, formCtrl: $scope.createFolderForm })) { dataTypeResource.createContainer(node.id, $scope.model.folderName).then(function (folderId) { navigationService.hideMenu(); var currPath = node.path ? node.path : "-1"; navigationService.syncTree({ tree: "datatypes", path: currPath + "," + folderId, forceReload: true, activate: true }); - formHelper.resetForm({ scope: $scope, formCtrl: this.createFolderFor }); + formHelper.resetForm({ scope: $scope, formCtrl: $scope.createFolderForm }); }, function(err) { - formHelper.resetForm({ scope: $scope, formCtrl: this.createFolderFor, hasErrors: true }); + formHelper.resetForm({ scope: $scope, formCtrl: $scope.createFolderForm, hasErrors: true }); // TODO: Handle errors }); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.html b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.html index 00a2bab64825..9440d896a500 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatypes/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/datatypes/create.html @@ -1,7 +1,7 @@