<form class="formPendencias" method="post" action="/sinistro2/processo/criachamadosinistro">
  <div id="tabs">
    <ul>
      <li><a href="#aba1">Pendências Cadastradas</a></li>
      <li><a href="#aba2">Cadastrar Pendência</a></li>
    </ul>

    <div class="geral">
      <div id="aba1">
        <div id="showListPendencias">

          <table class='grid2' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
            <thead>
            <tr>
              <th align="center" nowrap="nowrap">Chamado</th>
              <th id="ds_nome_pendencia" align="center" nowrap="nowrap">Pendência</th>
              <th align="center" nowrap="nowrap">Ver</th>
            </tr>
            </thead>
            <tbody>
            <?php
            $i = 0;
            foreach ($this->chamados as $chamados):
                $class = $i % 2 == 0 ? '' : $class = "highlight";
                ?>
              <tr class="<?= $class[0]; ?>">
                <td><?= $chamados['id']; ?></td>
                <td><?= nl2br($chamados['ds_descricao']) ?></td>
                <td align='center' width='1%' nowrap='nowrap'>
                  <a class="icon_view" href="/atendimento/chamado/view/id/<?= $chamados['id'] ?>">
                    <img src="/resources/imagens/mini/view.png" border="0" alt="view.png" title="Visualizar Chamado"
                         style="cursor:pointer"/>
                  </a>
                </td>
              </tr>
                <?php
                $i++;
            endforeach;
            ?>
            </tbody>
          </table>

        </div>
      </div>

      <div id="aba2">
        <div style="width:100%; overflow:auto; height: 125px; margin-bottom: 5px">
          <input type="hidden" id="id_proposta" name="id_proposta" value="<?= $this->data['id_proposta'] ?>">
          <input type="hidden" id="id_processo" name="id_processo" value="<?= $this->data['id'] ?>">
            <?php
            foreach ($this->pendencias as $key => $pendencia):
                if (!$pendencia['mostrar_pendencia']) {
                  continue;
                }
                ?>
              <div class="element">
                <input type='checkbox' class='id_pendencia' name="pendencia[]"
                       value='<?= $pendencia['ds_nome_pendencia'] ?>' <?= ($pendencia['marcado'] ? 'checked' : '') ?> />
                  <?= $pendencia['ds_nome_pendencia'] ?>
              </div>
              <div class="clear"></div>
            <?php
            endforeach;
            ?>
        </div>
        <div class="element" style="width:99%">
          <label style="margin-top:20px; display:block;">Observação</label>
          <textarea id='ds_observacao_pendencia' name='ds_observacao_pendencia' rows='7'
                    style="width:99%"><?= $this->prazo['ds_observacao'] ?></textarea>
        </div>
      </div>
    </div>
  </div>
</form>
