<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<script type="text/javascript">
<!--
function check_reminder_boxes(self) {
    if($(self).is(':checked')) {
        $('div.panel_send_invoice_reminder').find('input[name=\'invoice_id[]\']').attr('checked',  'checked');
    } else {
        $('div.panel_send_invoice_reminder').find('input[name=\'invoice_id[]\']').removeAttr('checked');
    }
}
//-->
</script>

<div class="panel panel_send_invoice_reminder">
<tmpl_if name="show_list">  
  <div class="pnl_listarea">
    <fieldset><legend>{tmpl_var name="head_txt"}</legend>
      <table class="list">
        <thead>
          <tr>
            <th class="tbl_col_send" scope="col"><tmpl_var name="send_txt"><input type="checkbox" name="selall" onclick="check_reminder_boxes(this);" checked="checked" /></th>
            <th class="tbl_col_invoice_number" scope="col"><tmpl_var name="invoice_number_txt"></th>
            <th class="tbl_col_reminder_step" scope="col"><tmpl_var name="reminder_step_txt"></th>
            <th class="tbl_col_invoice_date" scope="col"><tmpl_var name="invoice_date_txt"></th>
			<th class="tbl_col_due_date" scope="col"><tmpl_var name="due_date_txt"></th>
            <th class="tbl_col_due_date" scope="col"><tmpl_var name="client_txt"></th>
          </tr>
        </thead>
        <tbody>
          <tmpl_loop name="invoices">
          <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
            <td class="tbl_col_send"><input type="checkbox" name="invoice_id[]" value="{tmpl_var name="invoice_id"}" checked="checked" /></td>
            <td class="tbl_col_invoice_number">{tmpl_var name="invoice_number"}</td>
            <td class="tbl_col_reminder_step">{tmpl_var name="next_reminder_step"}</td>
			<td class="tbl_col_invoice_date">{tmpl_var name="invoice_date"}</td>
            <td class="tbl_col_due_date">{tmpl_var name="due_date"}</td>
            <td class="tbl_col_due_date">{tmpl_var name="contact_name"} :: {tmpl_var name="company_name"}</td>
          </tr>
          </tmpl_loop>
        </tbody>
        <tfoot>
          <tr>
            <td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
          </tr>
        </tfoot>
      </table>
    </fieldset>
  </div>
</tmpl_if>  
  <!--<div class="pnl_formsarea">-->
    <fieldset class="inlineLabels"><!--<legend>{tmpl_var name="head_txt"}</legend>-->
    
	
  <tmpl_if name="msg">
	<div id="OKMsg"><p><tmpl_var name="msg"></p></div>
  </tmpl_if>
  <tmpl_if name="error">
	<div id="errorMsg"><h3>ERROR</h3><ol><tmpl_var name="error"></ol></div>
  </tmpl_if>
<tmpl_if name="show_list">
	<div class="ctrlHolder">
	      <label for="email_template_id">{tmpl_var name='email_template_id_txt'}</label>
	      <select name="email_template_id" id="email_template_id" class="selectInput">
		  {tmpl_var name='email_template_id'}
		  </select>
      </div>

    <input type="hidden" name="id" value="{tmpl_var name='id'}">
	<input type="hidden" name="form_send" value="1">

    <div class="buttonHolder buttons">
	  <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_send_txt'}" onClick="submitForm('pageForm','billing/send_invoice_reminder.php?action=send');"><span>{tmpl_var name='btn_send_txt'}</span></button>
      <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('billing/reminder_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
    </div>
	
  <!--</div>-->
<tmpl_else>
	<div class="buttonHolder buttons">
	  <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_back_txt'}" onClick="submitForm('pageForm','{tmpl_var name='page_back_link'}');"><span>{tmpl_var name='btn_back_txt'}</span></button>
    </div>
</tmpl_if>
 </fieldset>
</div>
