Skip to content

Commit

Permalink
Merge pull request #23282 from eileenmcnaughton/import_default_locati…
Browse files Browse the repository at this point in the history
…on_type

[REF] Do not treat site having a default location type as optional
  • Loading branch information
monishdeb authored May 5, 2022
2 parents a863d40 + 45a5074 commit 1e31701
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CRM/Contact/Import/Form/MapField.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,8 @@ public function buildQuickForm() {

$this->_location_types = ['Primary' => ts('Primary')] + CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
$defaultLocationType = CRM_Core_BAO_LocationType::getDefault();

// Pass default location to js
if ($defaultLocationType) {
$this->assign('defaultLocationType', $defaultLocationType->id);
$this->assign('defaultLocationTypeLabel', $this->_location_types[$defaultLocationType->id]);
}
$this->assign('defaultLocationType', $defaultLocationType->id);
$this->assign('defaultLocationTypeLabel', $this->_location_types[$defaultLocationType->id]);

/* Initialize all field usages to false */
foreach ($mapperKeys as $key) {
Expand Down

0 comments on commit 1e31701

Please sign in to comment.