From ddb148715ea0fc5bb28c3c64ab7b639d77506486 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Sep 2019 12:36:06 -0400 Subject: [PATCH] (af-model) Rename "af-autofill" to "autofill" --- ext/afform/core/Civi/Api4/Action/Afform/Prefill.php | 4 ++-- ext/afform/core/ang/af/Form.js | 2 +- ext/afform/core/ang/af/Model.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Prefill.php b/ext/afform/core/Civi/Api4/Action/Afform/Prefill.php index b8babb67d7..f3adcead23 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Prefill.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Prefill.php @@ -17,8 +17,8 @@ class Prefill extends AbstractProcessor { $this->loadEntity($entity, $this->args[$entityName]); } // Load entities from autofill settings - elseif (!empty($entity['af-autofill'])) { - $this->autofillEntity($entity, $entity['af-autofill']); + elseif (!empty($entity['autofill'])) { + $this->autofillEntity($entity, $entity['autofill']); } } $data = []; diff --git a/ext/afform/core/ang/af/Form.js b/ext/afform/core/ang/af/Form.js index 48ea2696e6..0b3f5a0cff 100644 --- a/ext/afform/core/ang/af/Form.js +++ b/ext/afform/core/ang/af/Form.js @@ -40,7 +40,7 @@ this.loadData = function() { var toLoad = 0; _.each(schema, function(entity, entityName) { - if ($routeParams[entityName] || entity.afAutofill) { + if ($routeParams[entityName] || entity.autofill) { toLoad++; } }); diff --git a/ext/afform/core/ang/af/Model.js b/ext/afform/core/ang/af/Model.js index 545ebf7f2f..180f8784a0 100644 --- a/ext/afform/core/ang/af/Model.js +++ b/ext/afform/core/ang/af/Model.js @@ -9,7 +9,7 @@ afData: '=', afName: '@', label: '@', - afAutofill: '@' + autofill: '@' }; return { restrict: 'AE', -- 2.25.1