Commit 1769017f authored by Evren Kutar's avatar Evren Kutar

edit object send object id fix

parent 15005634
...@@ -41,6 +41,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log, ...@@ -41,6 +41,7 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log,
} }
); );
}); });
$scope.object_id = $routeParams.id;
$scope.onSubmit = function (form) { $scope.onSubmit = function (form) {
$scope.$broadcast('schemaFormValidate'); $scope.$broadcast('schemaFormValidate');
if (form.$valid) { if (form.$valid) {
......
...@@ -46,7 +46,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $timeout, RESTURL ...@@ -46,7 +46,7 @@ form_generator.factory('Generator', function ($http, $q, $log, $timeout, RESTURL
generator.submit = function ($scope) { generator.submit = function ($scope) {
if($scope.object_id) { if($scope.object_id) {
var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel); var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel);
var data = {"object_id": $scope.id, "form": get_diff, "cmd": "do"}; var data = {"object_id": $scope.object_id, "form": get_diff, "cmd": "do"};
} }
else { else {
data = {"form": $scope.model, "cmd": "do"}; data = {"form": $scope.model, "cmd": "do"};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment