<!-- BEGIN outreach/followup.tt -->
    [% BLOCK is_disabled; # followup menu replaced by edit link if option set:
        is_disabled = outreach.followup
        ? 1 : 0; # set flag for later
        site.html.disabled IF is_disabled;
        END;
    %]

  [% # PROCESS dumper.tt dump = outreach.followup %]
  
  <tr>
    <td class="label">Follow up:</td>
    <td>
      <select name="followup_option_id" [% PROCESS is_disabled %]>
        <option value="">--select one--</option>
      [% FOREACH opt IN outreach.menu_options.followup_options;
        id = opt.key;
        label = opt.value.label;
      %]
        <option value="[% id %]"
            [% 'selected' IF outreach.followup.followup_option_id == id %]>
          [% label %]
        </option>
      [% END %]
      </select>
      
      [% IF outreach.followup.pack_sent # display sent & returns due dates: %]
        <span class="title">pack sent</span>:
        <input type="text" readonly="readonly" size="14"
          value="[% outreach.followup.pack_sent.strftime('%a %d.%b.%Y') %]" />
        <span class="title">return due</span>:
        <input type="text" readonly="readonly" size="14"
          value="[% outreach.followup.return_due.strftime('%a %d.%b.%Y') %]" />

      [% ELSIF outreach.followup.pack_due # display dispatch due date %]
        <span class="title">pack dispatch due</span>:
        <input type="text" readonly="readonly" size="9"
          value="[% outreach.followup.pack_due.strftime('%d.%b.%Y') %]" />
      [% END %]
      
      [% IF is_disabled # provide link to edit: %]
      <a href="[% app_url %]/outreach/edit_followup/[% request_data.id %]">[ edit ]</a>
      [% END %]
      <input type="hidden" name="is_outreach" value="1" />
    </td>
  </tr>
<!-- END outreach/followup.tt -->
