| 1 |
<?php |
| 2 |
/** |
| 3 |
* groupSelectionForm.php |
| 4 |
* |
| 5 |
* Shows the selection form. |
| 6 |
* |
| 7 |
* PHP versions 5 |
| 8 |
* |
| 9 |
* @category UserAccessManager |
| 10 |
* @package UserAccessManager |
| 11 |
* @author Alexander Schneider <alexanderschneider85@googlemail.com> |
| 12 |
* @copyright 2008-2010 Alexander Schneider |
| 13 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 |
| 14 |
* @version SVN: $Id$ |
| 15 |
* @link http://wordpress.org/extend/plugins/user-access-manager/ |
| 16 |
*/ |
| 17 |
?> |
| 18 |
<input type="hidden" name="uam_update_groups" value="true" /> |
| 19 |
<ul class="uam_group_selection"> |
| 20 |
<?php |
| 21 |
if (!isset($sGroupsFormName) |
| 22 |
|| $sGroupsFormName === null |
| 23 |
) { |
| 24 |
$sGroupsFormName = 'uam_usergroups'; |
| 25 |
} |
| 26 |
|
| 27 |
foreach ($aUamUserGroups as $oUamUserGroup) { |
| 28 |
$sAddition = ''; |
| 29 |
$sAttributes = ''; |
| 30 |
|
| 31 |
if (array_key_exists($oUamUserGroup->getId(), $aUserGroupsForObject)) { |
| 32 |
$sAttributes .= 'checked="checked" '; |
| 33 |
} |
| 34 |
|
| 35 |
if (isset($aUserGroupsForObject[$oUamUserGroup->getId()]->aSetRecursive[$sObjectType][$iObjectId])) { |
| 36 |
$sAttributes .= 'disabled="" '; |
| 37 |
$sAddition .= ' [LR]'; |
| 38 |
} |
| 39 |
|
| 40 |
?> |
| 41 |
<li> |
| 42 |
<label for="<?php echo $sGroupsFormName; ?>-<?php echo $oUamUserGroup->getId(); ?>" class="selectit" style="display:inline;" > |
| 43 |
<input type="checkbox" id="<?php echo $sGroupsFormName; ?>-<?php echo $oUamUserGroup->getId(); ?>" <?php echo $sAttributes;?> value="<?php echo $oUamUserGroup->getId(); ?>" name="<?php echo $sGroupsFormName; ?>[]" /> |
| 44 |
<?php echo $oUamUserGroup->getGroupName().$sAddition; ?> |
| 45 |
</label> |
| 46 |
<a class="uam_group_info_link">(<?php echo TXT_UAM_INFO; ?>)</a> |
| 47 |
<?php include 'groupInfo.php'; ?> |
| 48 |
</li> |
| 49 |
<?php |
| 50 |
} |
| 51 |
?> |
| 52 |
</ul> |