Skip to content

Commit

Permalink
Add test for missing MP on postcode result page.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 4, 2024
1 parent 8181bc8 commit 39c00e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/includes/easyparliament/templates/html/postcode/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function member_image_box(string $person_id, string $person_url, string $person_
<div id="current">
<h2><?= gettext('Your representatives') ?></h2>
<ul>
<?php if ($mp) { ?>
<li class="postcode-rep-list__item"><span>
<?php if ($mp['former']) {
printf(gettext('Your former <strong>MP</strong> (Member of Parliament) is <a href="%s">%s</a>, %s'), '/mp/?p=' . $mp['person_id'], $mp['name'], gettext($mp['constituency']));
Expand All @@ -63,6 +64,9 @@ function member_image_box(string $person_id, string $person_url, string $person_
</span>
<?php member_image_box($mp["person_id"], '/mp/?p=' . $mp['person_id'], $mp['name']) ?>
</li>
<?php } else { ?>
<li>Your MP is currently unknown.</li>
<?php } ?>

<?php
if (isset($mcon) && !empty($mcon)) {
Expand Down

0 comments on commit 39c00e7

Please sign in to comment.