summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-06 10:10:54 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-06 10:10:54 +0000
commitcb3109784e073cc02216e189eb9f17818c078f30 (patch)
treee71d62f9350fe30fab2e85226a244a172e3faea0
parent4ee24a6645c71b5169861f2ffa3df396fa9e3e4c (diff)
Wrap permissions in a <fieldset> so that we get a label for the dialog
-rw-r--r--core/views/permissions_form.html.php77
1 files changed, 40 insertions, 37 deletions
diff --git a/core/views/permissions_form.html.php b/core/views/permissions_form.html.php
index 6a977586..94a3bead 100644
--- a/core/views/permissions_form.html.php
+++ b/core/views/permissions_form.html.php
@@ -1,47 +1,50 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<form method="post" action="<?= url::site("permissions/edit/$item->id") ?>">
<?= access::csrf_form_field() ?>
+ <fieldset>
+ <legend><?= _("Edit Permissions") ?> </legend>
- <table>
- <tr>
- <th> </th>
- <? foreach ($groups as $group): ?>
- <th> <?= $group->name ?> </th>
- <? endforeach ?>
- </tr>
+ <table>
+ <tr>
+ <th> </th>
+ <? foreach ($groups as $group): ?>
+ <th> <?= $group->name ?> </th>
+ <? endforeach ?>
+ </tr>
- <? foreach ($permissions as $permission): ?>
- <tr>
- <td> <?= _($permission->display_name) ?> </td>
- <? foreach ($groups as $group): ?>
- <td>
- <? $intent = access::group_intent($group, $permission->name, $item) ?>
- <? $allowed = access::group_can($group, $permission->name, $item) ?>
- <? $lock = access::locked_by($group, $permission->name, $item) ?>
+ <? foreach ($permissions as $permission): ?>
+ <tr>
+ <td> <?= _($permission->display_name) ?> </td>
+ <? foreach ($groups as $group): ?>
+ <td>
+ <? $intent = access::group_intent($group, $permission->name, $item) ?>
+ <? $allowed = access::group_can($group, $permission->name, $item) ?>
+ <? $lock = access::locked_by($group, $permission->name, $item) ?>
- <? if ($lock): ?>
- <?= _("denied and locked by") ?> <a href="javascript:show(<?= $lock->id ?>)"><?= _("parent") ?></a>
- <? else: ?>
- <? if ($intent === null): ?>
- <? if ($allowed): ?>
- <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed by parent</a>
- <? else: ?>
- <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied by parent</a>
- <? endif ?>
- </a>
- <? elseif ($intent === access::DENY): ?>
- <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied</a>
- <? elseif ($intent === access::ALLOW): ?>
- <? if ($item->id == 1): ?>
- <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a>
- <? else: ?>
- <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a>
+ <? if ($lock): ?>
+ <?= _("denied and locked by") ?> <a href="javascript:show(<?= $lock->id ?>)"><?= _("parent") ?></a>
+ <? else: ?>
+ <? if ($intent === null): ?>
+ <? if ($allowed): ?>
+ <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed by parent</a>
+ <? else: ?>
+ <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied by parent</a>
+ <? endif ?>
+ </a>
+ <? elseif ($intent === access::DENY): ?>
+ <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied</a>
+ <? elseif ($intent === access::ALLOW): ?>
+ <? if ($item->id == 1): ?>
+ <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a>
+ <? else: ?>
+ <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a>
+ <? endif ?>
<? endif ?>
<? endif ?>
- <? endif ?>
- </td>
+ </td>
+ <? endforeach ?>
+ </tr>
<? endforeach ?>
- </tr>
- <? endforeach ?>
- </table>
+ </table>
+ <fieldset>
</form>