Skip to content

Commit

Permalink
Merge pull request #31 from compucorp/BTHAMM-7-fix-event-extra-settings
Browse files Browse the repository at this point in the history
BTHAMM-7: Fix Participant Role Assignment
  • Loading branch information
shahrukh-compuco authored Apr 9, 2024
2 parents 97951b6 + df57b24 commit 3a75176
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
run-unit-tests:

runs-on: ubuntu-latest
container: compucorp/civicrm-buildkit:1.3.0-php8.0-chrome
container: compucorp/civicrm-buildkit:1.3.1-php8.0

env:
CIVICRM_EXTENSIONS_DIR: site/web/sites/all/modules/civicrm/tools/extensions
Expand All @@ -29,7 +29,7 @@ jobs:
run : amp config:set --mysql_dsn=mysql://root:root@mysql:3306

- name: Build Drupal site
run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site
run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.94 --web-root $GITHUB_WORKSPACE/site

- uses: compucorp/[email protected]
env:
Expand Down
1 change: 1 addition & 0 deletions CRM/EventsExtras/Hook/BuildForm/BaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ protected function hideElementBySelector($selector) {
CRM_Core_Resources::singleton()->addScript(
"CRM.$(function($) {
$('{$selector}').hide();
$('{$selector} .required').removeClass('required');
});
");
}
Expand Down
2 changes: 2 additions & 0 deletions CRM/EventsExtras/Hook/BuildForm/EventInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private function setDefaults(&$form) {
if ($settingValues[$showRoles] == 0) {
$defaults['default_role_id'] = $settingValues[$roleDefault];
$fieldIdsToHide[] = 'default_role_id';
$form->getElement('default_role_id')->setSelected($settingValues[$roleDefault]);
}

$showParticipantListing = SettingsManager::SETTING_FIELDS['PARTICIPANT_LISTING'];
Expand All @@ -57,6 +58,7 @@ private function setDefaults(&$form) {
if ($settingValues[$showParticipantListing] == 0) {
$defaults['participant_listing_id'] = $settingValues[$participantListingDefault];
$fieldIdsToHide[] = 'participant_listing_id';
$form->getElement('participant_listing_id')->setSelected($settingValues[$participantListingDefault]);
}

$showIncludeMap = SettingsManager::SETTING_FIELDS['INCLUDE_MAP_LOCATION_EVENT'];
Expand Down

0 comments on commit 3a75176

Please sign in to comment.