Skip to content

Commit

Permalink
Merge pull request #1024 from compucorp/comcl-649-fix-custom-group-ad…
Browse files Browse the repository at this point in the history
…ditions

COMCL-649: Fix Custom Field Set Page
  • Loading branch information
shahrukh-compuco authored Aug 2, 2024
2 parents b8ad51e + 3a82313 commit 59b9ab2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ public function run($form, $formName) {
return;
}

$contactTypes = json_decode($form->get_template_vars('contactTypes'));
$multipleTypes = $form->get_template_vars('allowMultiple');
$caseEntityNames = CaseType::buildOptions('case_type_category', 'validate');

// This is the generic entity for all cases.
$caseEntityNames[] = 'Case';

$contactTypes = array_merge($contactTypes, $caseEntityNames);
foreach ($caseEntityNames as $caseEntityName) {
$multipleTypes[$caseEntityName] = TRUE;
}

$form->assign('contactTypes', json_encode($contactTypes));
$form->assign('allowMultiple', $multipleTypes);
CRM_Core_Resources::singleton()->addSetting([
'caseEntityNames' => $caseEntityNames,
]);
Expand Down
4 changes: 2 additions & 2 deletions js/custom-group-form.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(function ($, _, caseEntityNames) {
$(document).on('crmLoad', function () {
var $multipleRecordsCheckboxRow = $('#is_multiple_row');
var $multipleRecordsCheckboxRow = $('tr.field-is_multiple');
var $styleSelectTabWithTableOption = $('select[name="style"] option[value="Tab with table"]');
var $extendSelect = $('#extends_0');
var $extendSelect = $('#extends');

(function init () {
hideShowElementsNotRelevantWhenExtendingCases();
Expand Down

0 comments on commit 59b9ab2

Please sign in to comment.