Skip to content

Commit

Permalink
moving assignment of form_attributes to outer scope #1503 #1508
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Iosif committed Dec 14, 2016
1 parent c83ca19 commit 90d43b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/main/posts/detail/post-detail.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ function (
$scope.post_task = {};
$scope.hasPermission = $rootScope.hasPermission;
$scope.canCreatePostInSurvey = PostSurveyService.canCreatePostInSurvey;

$scope.mapDataLoaded = false;
$scope.form_attributes = [];

$scope.publishedFor = function () {
if ($scope.post.status === 'draft') {
return 'post.publish_for_you';
Expand Down Expand Up @@ -75,11 +76,8 @@ function (
if ($scope.post.user && $scope.post.user.id) {
$scope.post.user = UserEndpoint.get({id: $scope.post.user.id});
}

// Load the post form
if ($scope.post.form && $scope.post.form.id) {
$scope.form_attributes = [];

$q.all([
FormEndpoint.get({id: $scope.post.form.id}),
FormStageEndpoint.query({formId: $scope.post.form.id}).$promise,
Expand Down

0 comments on commit 90d43b9

Please sign in to comment.