fixed 'edit this form' button
This commit is contained in:
parent
71735f3bec
commit
4c21c176c2
|
@ -1,8 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
|
||||
angular.module('core').controller('HomeController', ['$rootScope', '$scope', 'User', 'Auth', '$state',
|
||||
function($rootScope, $scope, User, Auth, $state) {
|
||||
angular.module('core').controller('HomeController', ['$rootScope', '$scope', 'User', '$state',
|
||||
function($rootScope, $scope, User, $state) {
|
||||
$scope = $rootScope;
|
||||
}
|
||||
]);
|
|
@ -1,9 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
// Forms controller
|
||||
angular.module('forms').controller('SubmitFormController', ['$scope', '$rootScope', '$stateParams', '$state', 'Forms', 'CurrentForm', 'Auth', 'myForm',
|
||||
function($scope, $rootScope, $stateParams, $state, Forms, CurrentForm, Auth, myForm) {
|
||||
$scope.authentication = Auth;
|
||||
angular.module('forms').controller('SubmitFormController', ['$scope', '$rootScope', '$state', 'myForm',
|
||||
function($scope, $rootScope, $state, myForm) {
|
||||
$scope.authentication = $rootScope.authentication;
|
||||
$scope.myform = myForm;
|
||||
|
||||
if(!$scope.myform.isLive){
|
||||
|
|
|
@ -9,6 +9,8 @@ angular.module('forms').directive('submitFormDirective', ['$http', '$timeout', '
|
|||
myform:'='
|
||||
},
|
||||
controller: function($scope){
|
||||
$scope.authentication = $rootScope.authentication;
|
||||
|
||||
angular.element(document).ready(function() {
|
||||
|
||||
$scope.error = '';
|
||||
|
|
|
@ -61,7 +61,8 @@
|
|||
</div>
|
||||
<div class="hidden-xs hidden-sm col-md-6 col-md-offset-3 row">
|
||||
<div class="col-md-4 col-md-offset-2" ng-if="!authentication.isAuthenticated()">
|
||||
<a href="/#!/forms" class="btn btn-default">Create a NodeForm</a>
|
||||
<a href="/#!/forms" class="btn btn-default">Create
|
||||
a NodeForm</a>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-2" ng-if="authentication.isAuthenticated()" class="hidden-sm hidden-xs">
|
||||
<a href="/#!/forms/{{myform._id}}/admin/create" class="btn btn-default">Edit this NodeForm</a>
|
||||
|
|
Loading…
Reference in a new issue