<!-- manage groups template -->
<script type="text/javascript" src="{$template}/scripts/js/functions.groups.js" />
<script type="text/javascript">
{$jsonGroups}
var $j = jQuery.noConflict();
$j(document).ready(function(){
var loading = '<img src="{$templates}/images/loading.gif" width="20" height="20" alt="Loading content..." title="Loading content..." />';
$j('.sub-form').live('submit', function(){
$j('#tabsConfig .ui-tabs-panel:visible').html(loading);
$j.ajax({
data: $j(this).serialize(),
type: $j(this).attr('method'),
url: $j(this).attr('action'),
success: function(response) {
$j('#tabsConfig .ui-tabs-panel:visible').html(response);
}
});
return false;
})
$j("#autoGroups").autocomplete(groups, {
minChars: 0,
width: 310,
matchContains: "word",
autoFill: true,
callBack: queryGroups,
formatItem: function(row, i, max) {
return i + "/" + max + ": " + row.txtGroupName + " :: " + row.txtGroupManager + " :: " + row.txtGroupDescription + " :: " + row.txtGroupPhone;
},
formatMatch: function(row, i, max) {
return row.txtGroupName + " " + row.txtGroupManager + " " + row.txtGroupDescription + " " + row.txtGroupPhone;
},
formatResult: function(row) {
return row.txtGroupName + " :: " + row.txtGroupManager + " :: " + row.txtGroupDescription + " :: " + row.txtGroupPhone;
}
});
});
</script>
<form action="{$URL}" method="post" class="sub-form" name="groups" id="groups">
<fieldset>
<legend>Manage groups
<a href="javascript:popUp('help/help.html','800','800')" title="Need help?"><img src="{$template}/images/icons/icon-info.png" alt="{$TITLE} Help"></a>
</legend>
{$error}
<div title="Search existing groups">
Existing groups
<input type="text" id="autoGroups" title="Search existing groups?" style="width: 30%" value="Search groups?" onclick="this.value=''" onblur="if(this.value==''){this.value='Search groups?'}">
<a href="formAdvGroupSearch.php" class="windowSearchGroups" id="windowSearchGroups" title="Search existing groups?" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img src="{$template}/images/icons/icon-search.png" title="Search existing groups?" alt="Search existing groups?"></a><hr />
</div>
<div>
<table border="0" width="100%" cellspacing="5">
<tr align="left">
<td class="txt" nowrap title="Group name" nowrap><b>Name:</b></td>
<td><input type="text" name="txtGroupName" id="txtGroupName" value="{$txtGroupName}" style="width: 100%"></td>
<td class="copywrite">{$txtGroupNameErr}</td>
</tr>
<tr>
<td class="txt" nowrap title="Group manager" nowrap><b>Manager:</b></td>
<td><input type="text" name="txtGroupManager" id="txtGroupManager" value="{$txtGroupManager}" style="width: 100%"></td>
<td class="copywrite">{$txtGroupManagerErr}</td>
</tr>
<tr>
<td class="txt" nowrap title="Group phone" nowrap><b>Phone:</b></td>
<td><input type="text" name="txtGroupPhone" id="txtGroupPhone" value="{$txtGroupPhone}" style="width: 100%"></td>
<td class="copywrite">{$txtGroupPhoneErr}</td>
</tr>
<tr>
<td class="txt" nowrap title="Group description" nowrap><b>Description:</b></td>
<td><input type="text" name="txtGroupDescription" id="txtGroupDescription" value="{$txtGroupDescription}" style="width: 100%"></td>
<td class="copywrite">{$txtGroupDescriptionErr}</td>
</tr>
</table>
</div>
<div align="center">
<input type="hidden" id="cmd" name="cmd" />
<input type="submit" id="myForm" name="addGroup" title="Add new group" value="Add new group" onclick="$j('#cmd').val($j(this).attr('name'))" />
<input type="submit" id="myForm" name="editGroup" title="Edit group" value="Edit group" onclick="$j('#cmd').val($j(this).attr('name'))" />
<input type="submit" id="myForm" name="delGroup" title="Delete group" value="Delete group" onclick="$j('#cmd').val($j(this).attr('name'));return confirm('Are you sure you wish to delete the \''+$j('#txtGroupName').val()+'\' group?\n\nThis will remove all users and resource object\npermissions associated with this group')" />
</div>
</fieldset>
</form>
<div style="height: 30px"> </div>
<form action="{$URL}" method="post" class="sub-form" name="import" id="import">
<fieldset>
<legend>Import groups
<a href="javascript:popUp('help/help.html','800','800')" title="Need help?"><img src="{$template}/images/icons/icon-info.png" alt="{$TITLE} Help"></a>
</legend>
{$lerror}
<div>
<table border="0" width="100%" cellspacing="5">
<tr align="left">
<td class="txt" title="Import groups"><b>Use the form below to import groups and optionally users associated with selected groups from a configured Active Directory/OpenLDAP user repository</b></td>
</tr>
<tr align="left">
<td class="txt" title="Import groups">{$importGroups}</td>
</tr>
</table>
</div>
<div align="center">
<input type="hidden" id="cmd" name="cmd" />
<input type="submit" id="myForm" name="importGroup" title="Import group(s)" value="Import group(s)" onclick="$j('#cmd').val($j(this).attr('name'))" />
</div>
</fieldset>
</form>
<!-- end manage groups template -->