<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<?php if ($success) { ?>
<div class="success"><?php echo $success; ?></div>
<?php } ?>
<table class="list">
  <thead>
    <tr>
      <td colspan=2 class="left">Postcodes</td>
    </tr>
  </thead>
  <tbody>
    <?php if ($postcodes) { ?>
    <?php foreach ($postcodes as $postcode) { ?>
    <tr>
      <td class="left"><?php echo $postcode['postcode']; ?></td>
      <td class="left"><a id="button-postcode" class="button" onclick="deletePostCode('<?php echo $postcode['postcode']; ?>');"><span>Delete Postcode</span></a></td>
    </tr>
    <?php } ?>   
    <?php } else { ?>
    <tr>
      <td class="center" colspan="3"><?php echo $text_no_results; ?></td>
    </tr>
    <?php } ?>
  </tbody>
</table>
<div class="pagination"><?php echo $pagination; ?></div>