Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.44 #22171

Merged
merged 4 commits into from
Nov 30, 2021
Merged

5.44 #22171

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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