From: Tim Otten Date: Sat, 14 Sep 2019 02:02:27 +0000 (-0400) Subject: - By default, show an indicator of submission status X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=14ba39975e1a245b0a4483164ef7dcb354058ba4;p=civicrm-core.git - By default, show an indicator of submission status --- diff --git a/ext/afform/core/ang/af/Form.js b/ext/afform/core/ang/af/Form.js index c5098391e6..2810e8cfe1 100644 --- a/ext/afform/core/ang/af/Form.js +++ b/ext/afform/core/ang/af/Form.js @@ -13,7 +13,7 @@ $scope.myCtrl.loadData(); } }, - controller: function($scope, $routeParams, crmApi4) { + controller: function($scope, $routeParams, crmApi4, crmStatus) { var schema = {}, data = {}; $scope.$parent[$scope.ctrl] = this; @@ -59,7 +59,8 @@ }; this.submit = function submit() { - crmApi4('Afform', 'submit', {name: this.getFormMeta().name, args: $routeParams, values: data}); + var submission = crmApi4('Afform', 'submit', {name: this.getFormMeta().name, args: $routeParams, values: data}); + return crmStatus({start: ts('Saving'), success: ts('Saved')}, submission); }; } };