Skip to content

Commit 441d905

Browse files
committed
Add SearchKit and FormBuilder configuration for displaying and adding related memberships
1 parent 3334ed5 commit 441d905

8 files changed

+437
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<af-form ctrl="afform">
2+
<af-entity actions="{create: true, update: true}" type="Membership" name="Membership1" label="Mitgliedschaft 1" security="RBAC" data="{membership_type_id: 1, status_id: 2}" url-autofill="1" />
3+
<fieldset af-fieldset="Membership1" class="af-container" af-title="Mitgliedschaft 1">
4+
<af-field name="contact_id" defn="{input_attrs: {quickAdd: ['civicrm/quick-add/Individual']}}" />
5+
<af-field name="owner_membership_id" defn="{input_type: 'DisplayOnly', input_attrs: {}}" />
6+
</fieldset>
7+
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()" ng-if="afform.showSubmitButton">Bestätigen</button>
8+
</af-form>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"type": "form",
3+
"requires": null,
4+
"entity_type": null,
5+
"join_entity": null,
6+
"title": "Related Membership Add/Edit Form",
7+
"description": null,
8+
"placement": [],
9+
"placement_filters": [],
10+
"placement_weight": null,
11+
"tags": null,
12+
"icon": "fa-list-alt",
13+
"server_route": "civicrm/membership/related/add",
14+
"is_public": false,
15+
"permission": [
16+
"access CiviCRM"
17+
],
18+
"permission_operator": "AND",
19+
"redirect": null,
20+
"submit_enabled": true,
21+
"submit_limit": null,
22+
"create_submission": true,
23+
"manual_processing": false,
24+
"allow_verification_by_email": false,
25+
"email_confirmation_template_id": null,
26+
"autosave_draft": false,
27+
"navigation": null,
28+
"modified_date": "2025-09-11 12:11:25",
29+
"confirmation_type": "redirect_to_url",
30+
"confirmation_message": "Added related membership."
31+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div af-fieldset="">
2+
<crm-search-display-table search-name="Primary_memberships" display-name="Primary_memberships" filters="{contact_id: options.contact_id}"></crm-search-display-table>
3+
</div>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"type": "search",
3+
"requires": null,
4+
"entity_type": null,
5+
"join_entity": null,
6+
"title": "Primary Memberships",
7+
"description": null,
8+
"placement": [
9+
"contact_summary_tab"
10+
],
11+
"placement_filters": [],
12+
"placement_weight": null,
13+
"tags": null,
14+
"icon": "fa-list-alt",
15+
"server_route": "",
16+
"is_public": false,
17+
"permission": [
18+
"access CiviCRM"
19+
],
20+
"permission_operator": "AND",
21+
"redirect": null,
22+
"submit_enabled": true,
23+
"submit_limit": null,
24+
"create_submission": false,
25+
"manual_processing": false,
26+
"allow_verification_by_email": false,
27+
"email_confirmation_template_id": null,
28+
"autosave_draft": false,
29+
"navigation": null,
30+
"modified_date": "2025-09-11 11:00:37",
31+
"confirmation_type": "redirect_to_url",
32+
"confirmation_message": null
33+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div af-fieldset="">
2+
<crm-search-display-table search-name="Related_Memberships" display-name="Related_Memberships" filters="{owner_membership_id: routeParams.owner_membership_id}"></crm-search-display-table>
3+
</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "search",
3+
"title": "Related Memberships",
4+
"placement": [],
5+
"placement_filters": [],
6+
"icon": "fa-list-alt",
7+
"server_route": "civicrm/membership/related",
8+
"permission": [
9+
"access CiviCRM"
10+
],
11+
"permission_operator": "AND",
12+
"confirmation_type": "redirect_to_url"
13+
}

info.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<format>25.01.1</format>
3535
</civix>
3636
<mixins>
37+
<mixin>mgd-php@1.0.0</mixin>
3738
<mixin>menu-xml@1.0.0</mixin>
3839
<mixin>setting-php@1.0.0</mixin>
3940
<mixin>entity-types-php@2.0.0</mixin>

0 commit comments

Comments
 (0)