<!-- admin/role-main-form.phtml -->
<script type="text/javascript">
$(function() {
	// tabs
    $("#tabs").tabs(
<?php
    if ($this->tabs_selected)
        echo '{ selected: ', $this->tabs_selected, ' }';
?>
    );
});
</script>



<div class="ui-widget">
	<h3>
        <?php echo $this->escape($this->title);?>
    </h3>
    <form method="POST" action="<?php echo $this->baseUrl;?>/admin/role-more-info/role_id/<?php echo $this->role_id; ?>" style="margin-bottom: 1em;">
        <input type="submit" name="name1" value="<?php echo $this->translate->_('More info') ?>" class="ui-button ui-state-default ui-corner-all" />
    </form>    
</div>


<?php if ( !empty($this->exception) ) : ?>
<!-- database, and other errors-->
<div class="ui-widget" style="width: 58em;">
    <div class="ui-state-error ui-corner-all" style="padding: 0pt 0.7em;">
        <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: 0.3em;"></span>
        <strong><?php echo $this->exception; ?></strong></p>
    </div>
</div>
<?php endif;?>


<div id="tabs" style="width: 62em;">
<ul>
    <li><a href="#tab-role">     <?php echo $this->translate->_('Role'); ?>          </a></li>
    <li><a href="#tab-webacula"> <?php echo $this->translate->_('Webacula ACL'); ?>  </a></li>
    <li><a href="#tab-client">   <?php echo $this->translate->_('Client'); ?>        </a></li>
    <li><a href="#tab-command">  <?php echo $this->translate->_('Command'); ?>       </a></li>
    <li><a href="#tab-fileset">  <?php echo $this->translate->_('FileSet'); ?>       </a></li>
    <li><a href="#tab-job">      <?php echo $this->translate->_('Job'); ?>           </a></li>
    <li><a href="#tab-pool">     <?php echo $this->translate->_('Pool'); ?>          </a></li>
    <li><a href="#tab-storage">  <?php echo $this->translate->_('Storage'); ?>       </a></li>
    <li><a href="#tab-where">    <?php echo $this->translate->_('Where'); ?>         </a></li>
</ul>



<!-- role form -->
<div id="tab-role">
<form  action="<?php echo $this->form_role->getAction();  ?>"
       method="<?php echo $this->form_role->getMethod();  ?>">
    <?php echo $this->form_role->role_id; ?>
    <?php echo $this->form_role->acl; ?>
    <?php echo $this->form_role->order; ?>
    <?php echo $this->form_role->role_name; ?>
    <?php echo $this->form_role->description; ?>
    <?php echo $this->form_role->inherit_id; ?>
    <?php echo $this->form_role->submit; ?>
    <?php echo $this->form_role->reset; ?>
</form>
</div>
<!-- end role form -->



<!-- webacula ACLs -->
<div id="tab-webacula">
<form  action="<?php echo $this->form_webacula->getAction();  ?>"
       method="<?php echo $this->form_webacula->getMethod();  ?>">
    <?php echo $this->form_webacula->role_id; ?>
    <?php echo $this->form_webacula->role_name; ?>
    <?php echo $this->form_webacula->acl; ?>
    <?php echo $this->form_webacula->webacula_resources; ?>
    <?php echo $this->form_webacula->submit; ?>
    <?php echo $this->form_webacula->reset; ?>
</form>
</div>
<!-- end webacula ACLs -->



<!-- Client ACL form -->
<div id="tab-client">
<form  action="<?php echo $this->form_client->getAction(); ?>"
       method="<?php echo $this->form_client->getMethod(); ?>">
    <?php echo $this->form_client->role_id;   ?>
    <?php echo $this->form_client->role_name; ?>
    <?php echo $this->form_client->acl; ?>
    <?php echo $this->form_client->order; ?>
    <?php echo $this->form_client->name;  ?>
    <?php echo $this->form_client->id;    ?>
    <?php echo $this->form_client->submit;?>
    <?php echo $this->form_client->reset; ?>
</form>

<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_client as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/client-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/client-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>

    <div class="div-bacula-fill">
        <form  action="<?php echo $this->form_bacula_fill_client->getAction();  ?>"
                method="<?php echo $this->form_bacula_fill_client->getMethod();  ?>">
            <?php echo $this->form_bacula_fill_client->role_id; ?>
            <?php echo $this->form_bacula_fill_client->role_name; ?>
            <?php echo $this->form_bacula_fill_client->bacula_fill; ?>
            <?php echo $this->form_bacula_fill_client->submit; ?>
        </form>
    </div>
</div>
<!-- end Client ACL form -->



<!-- Command ACLs -->
<div id="tab-command">
<form  action="<?php echo $this->form_commands->getAction();  ?>"
       method="<?php echo $this->form_commands->getMethod();  ?>">
    <?php echo $this->form_commands->role_id; ?>
    <?php echo $this->form_commands->role_name; ?>
    <?php echo $this->form_commands->acl; ?>
    <?php echo $this->form_commands->bacula_commands; ?>
    <?php echo $this->form_commands->submit; ?>
    <?php echo $this->form_commands->reset; ?>
</form>
</div>
<!-- end Clent ACLs -->



<!-- Fileset ACL form -->
<div id="tab-fileset">
<form  action="<?php echo $this->form_fileset->getAction(); ?>"
       method="<?php echo $this->form_fileset->getMethod(); ?>">
    <?php echo $this->form_fileset->role_id;   ?>
    <?php echo $this->form_fileset->role_name; ?>
    <?php echo $this->form_fileset->acl; ?>
    <?php echo $this->form_fileset->order; ?>
    <?php echo $this->form_fileset->name;  ?>
    <?php echo $this->form_fileset->id;    ?>
    <?php echo $this->form_fileset->submit;?>
    <?php echo $this->form_fileset->reset; ?>
</form>
    
<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_fileset as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/fileset-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/fileset-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>

    <div class="div-bacula-fill">
        <form  action="<?php echo $this->form_bacula_fill_fileset->getAction();  ?>"
                method="<?php echo $this->form_bacula_fill_fileset->getMethod();  ?>">
            <?php echo $this->form_bacula_fill_fileset->role_id; ?>
            <?php echo $this->form_bacula_fill_fileset->role_name; ?>
            <?php echo $this->form_bacula_fill_fileset->bacula_fill; ?>
            <?php echo $this->form_bacula_fill_fileset->submit; ?>
        </form>
    </div>
</div>
<!-- end Fileset ACL form -->



<!-- Job ACLs -->
<div id="tab-job">
<form  action="<?php echo $this->form_job->getAction(); ?>"
       method="<?php echo $this->form_job->getMethod(); ?>">
    <?php echo $this->form_job->role_id;   ?>
    <?php echo $this->form_job->role_name; ?>
    <?php echo $this->form_job->acl; ?>
    <?php echo $this->form_job->order; ?>
    <?php echo $this->form_job->name;  ?>
    <?php echo $this->form_job->id;    ?>
    <?php echo $this->form_job->submit;?>
    <?php echo $this->form_job->reset; ?>
</form>

<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_job as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/job-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/job-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>

    <div class="div-bacula-fill">
        <form  action="<?php echo $this->form_bacula_fill_job->getAction();  ?>"
               method="<?php echo $this->form_bacula_fill_job->getMethod();  ?>">
            <?php echo $this->form_bacula_fill_job->role_id; ?>
            <?php echo $this->form_bacula_fill_job->role_name; ?>
            <?php echo $this->form_bacula_fill_job->bacula_fill; ?>
            <?php echo $this->form_bacula_fill_job->submit; ?>
        </form>
    </div>
</div>
<!-- end Job ACLs -->



<!-- Pool ACL form -->
<div id="tab-pool">
<form  action="<?php echo $this->form_pool->getAction(); ?>"
       method="<?php echo $this->form_pool->getMethod(); ?>">
    <?php echo $this->form_pool->role_id;   ?>
    <?php echo $this->form_pool->role_name; ?>
    <?php echo $this->form_pool->acl; ?>
    <?php echo $this->form_pool->order; ?>
    <?php echo $this->form_pool->name;  ?>
    <?php echo $this->form_pool->id;    ?>
    <?php echo $this->form_pool->submit;?>
    <?php echo $this->form_pool->reset; ?>
</form>

<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_pool as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/pool-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/pool-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>

    <div class="div-bacula-fill">
        <form  action="<?php echo $this->form_bacula_fill_pool->getAction();  ?>"
               method="<?php echo $this->form_bacula_fill_pool->getMethod();  ?>">
            <?php echo $this->form_bacula_fill_pool->role_id; ?>
            <?php echo $this->form_bacula_fill_pool->role_name; ?>
            <?php echo $this->form_bacula_fill_pool->bacula_fill; ?>
            <?php echo $this->form_bacula_fill_pool->submit; ?>
        </form>
    </div>
</div>
<!-- end Pool ACL form -->



<!-- Storage ACL form -->
<div id="tab-storage">
<form  action="<?php echo $this->form_storage->getAction(); ?>"
       method="<?php echo $this->form_storage->getMethod(); ?>">
    <?php echo $this->form_storage->role_id;   ?>
    <?php echo $this->form_storage->role_name; ?>
    <?php echo $this->form_storage->acl; ?>
    <?php echo $this->form_storage->order; ?>
    <?php echo $this->form_storage->name;  ?>
    <?php echo $this->form_storage->id;    ?>
    <?php echo $this->form_storage->submit;?>
    <?php echo $this->form_storage->reset; ?>
</form>

<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_storage as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/storage-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/storage-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>

    <div class="div-bacula-fill">
        <form  action="<?php echo $this->form_bacula_fill_storage->getAction();  ?>"
               method="<?php echo $this->form_bacula_fill_storage->getMethod();  ?>">
            <?php echo $this->form_bacula_fill_storage->role_id; ?>
            <?php echo $this->form_bacula_fill_storage->role_name; ?>
            <?php echo $this->form_bacula_fill_storage->bacula_fill; ?>
            <?php echo $this->form_bacula_fill_storage->submit; ?>
        </form>
    </div>
</div>
<!-- end Storage ACL form -->



<!-- Where ACLs -->
<div id="tab-where">
<form  action="<?php echo $this->form_where->getAction(); ?>"
       method="<?php echo $this->form_where->getMethod(); ?>">
    <?php echo $this->form_where->role_id;   ?>
    <?php echo $this->form_where->role_name; ?>
    <?php echo $this->form_where->acl; ?>
    <?php echo $this->form_where->order; ?>
    <?php echo $this->form_where->name;  ?>
    <?php echo $this->form_where->id;    ?>
    <?php echo $this->form_where->submit;?>
    <?php echo $this->form_where->reset; ?>
</form>

<table id="box-table-admin" border="0">
<thead>
<tr>
    <th scope="col">id</th>
    <th scope="col"> <?php echo $this->translate->_('Name'); ?> </th>
    <th scope="col"> <?php echo $this->translate->_('Order'); ?> </th>
    <th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($this->rows_where as $line) : ?>
    <tr>
        <td>
            &nbsp;<?php echo $this->escape($line['id']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['name']);?>&nbsp;
        </td>
        <td>
            &nbsp;<?php echo $this->escape($line['order_acl']);?>&nbsp;
        </td>
        <td>
            <a href="<?php echo $this->baseUrl;?>/admin/where-update/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>">
                <img src="<?php echo $this->baseUrl ?>/images/document-edit.png" alt="<?php echo $this->translate->_("Modify record") ?>" title="<?php echo $this->translate->_("Modify record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
            <a href="<?php echo $this->baseUrl;?>/admin/where-delete/role_id/<?php echo $this->role_id ?>/id/<?php echo $line['id'] ?>" id="confirm" class="confirm" title="<?php echo $this->translate->_("Delete record") ?>">
                <img src="<?php echo $this->baseUrl ?>/images/edit-delete.png" alt="<?php echo $this->translate->_("Delete record") ?>" title="<?php echo $this->translate->_("Delete record") ?>" border="0" hspace="2" align="absmiddle" />
            </a>
        </td>
    </tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- end Where ACLs -->


</div>