Skip to content

Commit

Permalink
Remove unnecessary registerField process
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw authored and totten committed Sep 10, 2020
1 parent 2de6ab9 commit 62cee85
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion ext/afform/core/ang/af/Entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
var ts = $scope.ts = CRM.ts('afform'),
entity = _.pick($scope, _.keys(modelProps));
entity.id = null;
entity.fields = [];
afFormCtrl.registerEntity(entity);
// $scope.$watch('afEntity', function(newValue){$scope.myOptions = newValue;});
}
Expand Down
4 changes: 0 additions & 4 deletions ext/afform/core/ang/af/Fieldset.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
},
link: function($scope, $el, $attr, afFormCtrl) {
$scope.afFormCtrl = afFormCtrl;
// This is faster than waiting for each field directive to register itself
$('af-field', $el).each(function() {
afFormCtrl.registerField($scope.modelName, $(this).attr('name'));
});
},
controller: function($scope){
this.getDefn = function getDefn() {
Expand Down
3 changes: 0 additions & 3 deletions ext/afform/core/ang/af/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
schema[entity.modelName] = entity;
data[entity.modelName] = entity.data || {};
};
this.registerField = function(entityName, fieldName) {
schema[entityName].fields.push(fieldName);
};
this.getEntity = function getEntity(name) {
return schema[name];
};
Expand Down

0 comments on commit 62cee85

Please sign in to comment.