Fix- Unable to create members in the members section using the create option in the overlay

This commit is contained in:
Poornima Nayar
2019-08-29 23:00:37 +01:00
committed by Sebastiaan Janssen
parent 413b266335
commit 13e704e36c
2 changed files with 4 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
<ul class="umb-actions umb-actions-child">
<li class="umb-action" ng-repeat="docType in allowedTypes">
<button class="umb-action-link umb-outline btn-reset" href="#member/member/edit/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="hideActions()">
<button class="umb-action-link umb-outline btn-reset" ng-click="createMemberType(docType)">
<i class="large icon {{docType.icon}}"></i>
<span class="menu-label">
{{docType.name}}

View File

@@ -6,7 +6,7 @@
* @description
* The controller for the member creation dialog
*/
function memberCreateController($scope, memberTypeResource, iconHelper, navigationService) {
function memberCreateController($scope, memberTypeResource, iconHelper, navigationService, $location) {
memberTypeResource.getTypes($scope.currentNode.id).then(function (data) {
$scope.allowedTypes = iconHelper.formatContentTypeIcons(data);
@@ -17,7 +17,8 @@ function memberCreateController($scope, memberTypeResource, iconHelper, navigati
navigationService.hideDialog(showMenu);
};
$scope.hideActions = function () {
$scope.createMemberType = function (memberType) {
$location.path("/member/member/edit/" + $scope.currentNode.id).search("doctype", memberType.alias).search("create", "true");
navigationService.hideNavigation();
};
}