<!-- BEGIN {$smarty.template} -->

{literal}
<script type="text/javascript">

function set_mhopts()
{
if (document.getElementById("chk_manhours").checked) {
document.getElementById("sm1").disabled = false;
document.getElementById("sm2").disabled = false;
} else {
document.getElementById("sm1").disabled = true;
document.getElementById("sm2").disabled = true;
}
}

</script>
{/literal}

<div id="invoicebox">

<form action="add_bill.php" method="get">
<input type="hidden" name="prj_id" value="{$project.prj_id}" />
<input type="hidden" name="cpn_id" value="{$project.cpn_id}" />
<input type="hidden" name="action" value="{$smarty.const.ACTION_BILL_FROMPROJECT}" />

<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header"> {t}Create invoice{/t} </td>
    <td class="headeraction"> [ <a class="ptr" onclick="hideElement('invoicebox');">X</a> ] </td>
  </tr>
  <tr>
    <td class="label">{t}Add unbilled material{/t}</td>
    <td class="data">
      <input type="checkbox" name="add_material" />
    </td>
  </tr>
  <tr>
    <td class="label">{t}Add unbilled manhours{/t}</td>
    <td class="data">
      <input type="checkbox" name="add_manhours" id="chk_manhours" onclick="set_mhopts();"/> <br />
      <input type="radio" name="singlemulti" value="1" id="sm1" disabled="disabled"> {t}Single line item for all tasks{/t} <br />
      <input type="radio" name="singlemulti" value="2" id="sm2" checked="checked" disabled="disabled"> {t}One line item for each task{/t}
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="submit" value="{t}Create invoice{/t}" />
    </td>
  </tr>
</table>

</form>
</div>

<!-- END {$smarty.template} -->
