<?php $this->loadCss('/admin/media/css/dtree.css'); ?>
<?php $this->loadJavascript('/admin/media/js/dtree.js'); ?>

<div id="accoes_bg">
    <div id="titulo_accao"><nobr><?php echo $action; ?> <?php echo translateAdmin('de');?> <?php echo $section_singular; ?></nobr></div>
</div>

<div id="conteudo">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top" id="manutencaodisplay">
        <?php echo $form->start(); ?>
        <div class="acessibilidade">
        	<span>
            <?/*
            <img src="<?php echo $baseUrl;?>/media/images/previsualizar.gif"  border="0" align="absmiddle" hspace="3" title="<?php echo translateAdmin('Pr&eacute-Visualizar');?>" /><a href="#" class="linksacessibilidade"><?php echo translateAdmin('Pr&eacute;-Visualizar');?></a>&nbsp;
            <img src="<?php echo $baseUrl;?>/media/images/permissoes.gif"  border="0" align="absmiddle" hspace="3" title="<?php echo translateAdmin('Permiss&otilde;es');?>" /><a href="#" class="linksacessibilidade"><?php echo translateAdmin('Permiss&otilde;es');?></a>&nbsp;
            */?>
            <?php echo $form->submit_and_new->input; ?>
			<?php echo $form->submit_and_continue->input; ?>
			<?php echo $form->submit->input; ?>
            </span>
        </div>
        <div id="rte">
        <table border="0" cellpadding="2">
           <tr>
              <td width="10%" nowrap="nowrap" bgcolor="#f0f0ee" valign="top"><?php echo $form->nome->label; ?>:</td>
              <td width="90%" bgcolor="#f0f0ee" align="left">
                  <?php if ($form->nome->getErrorMessage()): ?>
                  <div class="error_message">
                     <?php echo $form->nome->getErrorMessage(); ?>
                  </div>
                  <?php endif; ?>
                        
                  <?php echo $form->nome->input; ?>
 
                  <?php if ($form->nome->help): ?>
                  <br /><label class="helper"><?php echo $form->nome->help; ?></label>
                  <?php endif; ?>
               </td>
           </tr>
           <tr>
              <td width="10%" nowrap="nowrap" bgcolor="#f0f0ee" valign="top"><?php echo translateAdmin('M&oacute;dulos');?>:</td>
              <td width="90%" bgcolor="#f0f0ee" align="left">
                  <?php /*foreach ($modulos as $modulo): ?>
                  <div style="line-height:19px;"><input type="checkbox" name="modulos_acesso[]" id="modulos_acesso" value="<?php echo $modulo->id; ?>" onfocus="this.className='focus';" onblur="this.className='';"<?php echo (isset($modulos_permissao) && in_array($modulo->id, $modulos_permissao)) ? ' checked="checked" ' : ''; ?>/> <?php echo $modulo->titulo; ?></div>
                  <?php endforeach; */?>
                  <a href="<?php echo $modulos->openAllLink(); ?>"><?php echo translateAdmin('Expandir tudo');?></a> | <a href="<?php echo $modulos->closeAllLink(); ?>"><?php echo translateAdmin('Fechar tudo');?></a></p>
                  <?php echo $modulos->render(); ?>
                  <label class="helper"><?php echo translateAdmin('Seleccione os M&oacute;dulos com acesso');?></label>
               </td>
           </tr>
           <tr>
              <td width="10%" nowrap="nowrap" bgcolor="#f0f0ee" valign="top"><?php echo translateAdmin('P&aacute;ginas');?>:</td>
              <td width="90%" bgcolor="#f0f0ee" align="left">
                 <div id="tree">
                    <?php echo $tree->render(); ?>
                 </div>
 
                  <label class="helper"><?php echo translateAdmin('Seleccione as P&aacute;ginas com acesso');?></label>
               </td>
           </tr>
           <?php if (Goweb::registry('session')->utilizador['perfil']['paginas_sistema'] > 0 || Goweb::registry('session')->utilizador['perfil']['superuser'] > 0): ?>
           <tr>
              <td width="10%" nowrap="nowrap" bgcolor="#f0f0ee" valign="top"><?php echo $form->paginas_sistema->label; ?>:</td>
              <td width="90%" bgcolor="#f0f0ee" align="left">
                  <?php if ($form->paginas_sistema->getErrorMessage()): ?>
                  <div class="error_message">
                     <?php echo $form->paginas_sistema->getErrorMessage(); ?>
                  </div>
                  <?php endif; ?>
                        
                  <?php echo $form->paginas_sistema->input; ?>
 
                  <?php if ($form->paginas_sistema->help): ?>
                  <br /><label class="helper"><?php echo $form->paginas_sistema->help; ?></label>
                  <?php endif; ?>
               </td>
           </tr>
           <?php endif; ?>
           <tr>
              <td width="10%" nowrap="nowrap" bgcolor="#f0f0ee" valign="top"><?php echo $form->activo->label; ?>:</td>
              <td width="90%" bgcolor="#f0f0ee" align="left">
                  <?php if ($form->activo->getErrorMessage()): ?>
                  <div class="error_message">
                     <?php echo $form->activo->getErrorMessage(); ?>
                  </div>
                  <?php endif; ?>
                        
                  <?php echo $form->activo->input; ?>
 
                  <?php if ($form->activo->help): ?>
                  <br /><label class="helper"><?php echo $form->activo->help; ?></label>
                  <?php endif; ?>
               </td>
            </tr>
         </table>
        <div align="right"></div>
        <br />
        <div class="acessibilidade">
        	<span>
            <?/*
            <img src="<?php echo $baseUrl;?>/media/images/previsualizar.gif"  border="0" align="absmiddle" hspace="3" title="<?php echo translateAdmin('Pr&eacute-Visualizar');?>" /><a href="#" class="linksacessibilidade"><?php echo translateAdmin('Pr&eacute;-Visualizar');?></a>&nbsp;
            <img src="<?php echo $baseUrl;?>/media/images/permissoes.gif"  border="0" align="absmiddle" hspace="3" title="<?php echo translateAdmin('Permiss&otilde;es');?>" /><a href="#" class="linksacessibilidade"><?php echo translateAdmin('Permiss&otilde;es');?></a>&nbsp;
            */?>
            <?php if (isset($delete_link)) : ?>
            <input type="button" id="delete_link" name="delete_link" value="<?php echo translateAdmin('Remover');?>" class="form_delete" style="width:85px;" onClick="if (confirm('<?php echo translateAdmin('Tem a certeza que deseja remover o item seleccionado');?>?')) { location='<?php echo $this->link($delete_link); ?>'; } "/>
            <?php endif; ?>
            <?php echo $form->submit_and_new->input; ?>
			<?php echo $form->submit_and_continue->input; ?>
			<?php echo $form->submit->input; ?>
            </span>
        </div>
        
        </div>
        <?php echo $form->getJsValidate()?>
        <?php echo $form->end(); ?>
        
    </td>
  </tr>
</table>
</div>
