<?php
  $modulo = 'bibliotecas-categorias-arquivos';
?>
<div class="row-fluid">
  <div class="span12 btn-inverse div-top-borded">
    Novo Arquivo de: <?=$this->category->titulo?>
    <a href="<?=$this->linkTo($modulo, "list", array('r'=>$this->category->id));?>" class="btn btn-small btn-info">&laquo; Voltar</a>
    <a href="<?=$this->linkTo($modulo, "new", array('r'=>$this->category->id));?>" class="btn btn-small btn-primary">Novo »</a>
  </div>
</div>
<div class="row-fluid box">
  <form class="span12 well pampa_form" onsubmit="SubmitForm()" action="<?=$this->linkTo($modulo, "add");?>" method="post" enctype="multipart/form-data">

    <?php

    $params = array(
      'page' => $this->page,
      'category' => $this->category,
    );
    echo $this->partial($modulo."/_form.phtml", $params);

    ?>

    <div class="form-actions">
      <input class="btn" type="button" value="Cancelar" onclick="window.location.href = $.baseURL('<?=$this->linkTo($modulo, "list");?>');" />
      <button type="submit" class="btn btn-primary">Enviar</button>
    </div>
  </form>
</div>

<script type="text/javascript">
  function SubmitForm() {
        tinyMCE.triggerSave();

      }
</script>
