<!-- 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" name="invoiceboxfrm">
<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}" />
<input type="hidden" name="op_billabletype" value="0" />

<table class="stdtable" cellspacing="0">
  <caption><em>{t}Create invoice{/t}</em>
    <a class="ptr" onclick="hideElement('invoicebox');"><img src="img/phpaga/close.png" alt="X" title="{t}Close{/t}"></a>
  </caption>
  <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 expenses{/t}</td>
    <td class="data">
      <input type="checkbox" name="add_expenses" />
    </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} -->
