Skip to content

Commit

Permalink
Fix force request
Browse files Browse the repository at this point in the history
  • Loading branch information
jcenturion committed Nov 11, 2015
1 parent 7934cbb commit d654204
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
10 changes: 1 addition & 9 deletions dist/scripts/api-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -1136,13 +1136,7 @@
var keys = Object.keys(form.form).filter(function (key) { return key.indexOf('$') === -1;});

keys.forEach(function (fieldName) {
var value = angular.copy(form.form[fieldName].$viewValue);

value = value || '';

console.log(value);

form.form[fieldName].$setViewValue(value);
form.form[fieldName].$setDirty();
});

return form.form.$valid;
Expand Down Expand Up @@ -1360,8 +1354,6 @@
jQuery($event.currentTarget).closest('form').find('.ng-invalid').first().focus();
}

// console.log($scope.form.$valid);

if($scope.context.forceRequest || validateForm($scope.form)) {
var url;
var context = $scope.context;
Expand Down
10 changes: 1 addition & 9 deletions src/app/directives/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,7 @@
var keys = Object.keys(form.form).filter(function (key) { return key.indexOf('$') === -1;});

keys.forEach(function (fieldName) {
var value = angular.copy(form.form[fieldName].$viewValue);

value = value || '';

console.log(value);

form.form[fieldName].$setViewValue(value);
form.form[fieldName].$setDirty();
});

return form.form.$valid;
Expand Down Expand Up @@ -381,8 +375,6 @@
jQuery($event.currentTarget).closest('form').find('.ng-invalid').first().focus();
}

// console.log($scope.form.$valid);

if($scope.context.forceRequest || validateForm($scope.form)) {
var url;
var context = $scope.context;
Expand Down

0 comments on commit d654204

Please sign in to comment.