Skip to content

Commit

Permalink
Merge pull request #2400 from phili67/phili67-personview-v2-bug-res-d…
Browse files Browse the repository at this point in the history
…eactivate

PersonView deactivation bug resolution
  • Loading branch information
phili67 committed May 17, 2023
2 parents b4d8e1f + 8471032 commit 8a60258
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/EcclesiaCRM/VIEWControllers/People/VIEWPeopleController.php
Expand Up @@ -56,6 +56,9 @@
use EcclesiaCRM\FamilyCustomQuery;
use EcclesiaCRM\FamilyCustomMasterQuery;

use EcclesiaCRM\Utils\GeoUtils;
use EcclesiaCRM\Utils\InputUtils;

use Slim\Views\PhpRenderer;

class VIEWPeopleController {
Expand Down Expand Up @@ -602,15 +605,6 @@ public function argumentsPeoplePersonViewArray ($iPersonID, $mode = 'none')

$sPageTitleSpan .= '</span>';

if (!empty($person->getDateDeactivated())) {
?>
<div class="alert alert-warning">
<strong><?= _("This Person is Deactivated") ?> </strong>
</div>
<?php
}


$persons = PersonQuery::Create()->filterByDateDeactivated(null)->findByFamId($iFamilyID);

$singlePerson = false;
Expand Down Expand Up @@ -668,8 +662,9 @@ public function argumentsPeoplePersonViewArray ($iPersonID, $mode = 'none')
'iFamilyID' => $iFamilyID,
'sFamilyEmails' => $sFamilyEmails
],
'PersonInfos' => [
'PersonInfos' => [
'iPersonID' => $iPersonID,
'singlePerson' => $singlePerson,
'person' => $person,
'sPhoneCountry' => $sPhoneCountry,
'sHomePhone' => $sHomePhone,
Expand Down Expand Up @@ -979,5 +974,5 @@ public function argumentsPeopleUpdateAllLatLonArray () {
'sPageTitle' => $sPageTitle
];

}
}
}
8 changes: 8 additions & 0 deletions src/v2/templates/people/personview.php
Expand Up @@ -23,6 +23,14 @@
require $sRootDocument . '/Include/Header.php';
?>

<?php if (!empty($PersonInfos['person']->getDateDeactivated())) {
?>
<div class="alert alert-warning">
<strong><?= _("This Person is Deactivated") ?> </strong>
</div>
<?php
} ?>

<div class="container-fluid">
<div class="row">
<div class="col-md-3">
Expand Down

0 comments on commit 8a60258

Please sign in to comment.