removed all circular dependency problems
This commit is contained in:
parent
410d999727
commit
a923b2d30e
|
@ -1,31 +1,38 @@
|
|||
<section data-ng-controller="ViewFormController" data-ng-init="findOne()">
|
||||
<div class="page-header">
|
||||
<h1 data-ng-bind="form.title"> Form Submissions</h1>
|
||||
</div>
|
||||
<div class="pull-right" data-ng-show="authentication.user._id == form.user._id">
|
||||
<a class="btn btn-primary" href="/#!/forms/{{form._id}}/edit">
|
||||
<i class="glyphicon glyphicon-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" data-ng-click="remove();">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
</a>
|
||||
<a class="btn btn-primary" href="/#!/forms/{{form._id}}">
|
||||
View Public Form
|
||||
</a>
|
||||
<a class="btn btn-primary" href="/#!/forms/{{form._id}}/submissions">
|
||||
View Form Submissions
|
||||
</a>
|
||||
</div>
|
||||
<section data-ng-controller="ViewSubmissionsController" data-ng-init="findAll()">
|
||||
<div class="row">
|
||||
<span class="col-md-5" data-ng-bind="form"></span>
|
||||
<div class="page-header col-xs-10 col-xs-offset-1">
|
||||
<h1>{{submissions[0].form.title}} submissions</h1>
|
||||
</div>
|
||||
<small>
|
||||
<em class="text-muted">
|
||||
</div>
|
||||
<div class="row container">
|
||||
<a data-ng-href="#!/forms/create" class="col-xs-2 col-xs-offset-1 form-item row container create-new">
|
||||
<div class="title-row col-xs-12">
|
||||
<h4 class=" fa fa-plus fa-6"></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 details-row">
|
||||
|
||||
<small class="list-group-item-text">
|
||||
Create a new form
|
||||
</small>
|
||||
|
||||
</div>
|
||||
|
||||
</a>
|
||||
<a data-ng-repeat="form in forms" data-ng-href="#!/forms/{{form._id}}/admin" class="col-xs-2 col-xs-offset-1 form-item row">
|
||||
<div class="title-row col-xs-12">
|
||||
<h4 class="list-group-item-heading" data-ng-bind="form.title"></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 details-row">
|
||||
|
||||
<small class="list-group-item-text">
|
||||
Created on
|
||||
<span data-ng-bind="form.created | date:'mediumDate'"></span>
|
||||
by
|
||||
<span data-ng-bind="form.admin.displayName"></span>
|
||||
</em>
|
||||
<span data-ng-bind="form.user.displayName"></span>
|
||||
</small>
|
||||
<!-- <p class="lead" data-ng-bind="form.content"></p> -->
|
||||
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
|
@ -3,10 +3,12 @@
|
|||
angular.module('users').controller('PasswordController', ['$scope', '$stateParams', '$state', 'Principal',
|
||||
function($scope, $stateParams, $state, Principal) {
|
||||
$scope.authentication = Principal;
|
||||
$scope.authentication.user = Principal.user();
|
||||
|
||||
//If user is signed in then redirect back home
|
||||
if ($scope.authentication.user) $state.go('home');
|
||||
if ($scope.authentication.isAuthenticated()) $state.go('home');
|
||||
|
||||
Principal.identity().then(function(response){
|
||||
$scope.authentication.user = response;
|
||||
|
||||
// Submit forgotten password account id
|
||||
$scope.askForPasswordReset = function() {
|
||||
|
@ -48,5 +50,6 @@ angular.module('users').controller('PasswordController', ['$scope', '$stateParam
|
|||
// $scope.error = response.message;
|
||||
// });
|
||||
};
|
||||
});
|
||||
}
|
||||
]);
|
Loading…
Reference in a new issue