Skip to content

Commit

Permalink
Merge pull request civicrm#22171 from civicrm/5.44
Browse files Browse the repository at this point in the history
5.44
  • Loading branch information
colemanw authored Nov 30, 2021
2 parents dfddd84 + 0961f3f commit 0094bba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ext/oauth-client/Civi/Api4/OAuthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public static function getFields($checkPermissions = TRUE) {
[
'name' => 'contactTemplate',
],
[
'name' => 'mailSettingsTemplate',
],
];
});
return $action->setCheckPermissions($checkPermissions);
Expand Down
13 changes: 9 additions & 4 deletions ext/search_kit/ang/crmSearchAdmin/crmSearchClause.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,21 @@
}
}

this.getField = function(expr) {
// Gets the first arg of type "field"
function getFirstArgFromExpr(expr) {
if (!(expr in meta)) {
meta[expr] = _.findWhere(searchMeta.parseExpr(expr).args, {type: 'field'});
}
return meta[expr] && meta[expr].field;
return meta[expr] || {};
}

this.getField = function(expr) {
return getFirstArgFromExpr(expr).field;
};

this.getOptionKey = function(expr) {
var field = ctrl.getField(expr) || {};
return field.suffix ? field.suffix.slice(1) : 'id';
var arg = getFirstArgFromExpr(expr);
return arg.suffix ? arg.suffix.slice(1) : 'id';
};

this.addGroup = function(op) {
Expand Down

0 comments on commit 0094bba

Please sign in to comment.