<{include file="db:user_header.html"}>
<h3><{$smarty.const._MD_USER_LANG_GROUP_MEMBER_EDIT}></h3>
<script type="text/javascript" charset="utf-8">
jQuery.noConflict();
jQuery(function(){
	jQuery('#<{$dirname}>_groupMemberForm :button[rel^="prettyPopin"]').prettyPopin({
		width : 400, /* false/integer */
		height: 400, /* false/integer */
		opacity: 0.5, /* value from 0 to 1 */
		animationSpeed: '0', /*
		slow/medium/fast/integer */
		close : false, /* true/false */
		followScroll: false, /* true/false */
        dirname : '<{$dirname}>',
		loader_path: './images/loader.gif', /* path to your loading image */
		callback: function(id,value){
			var form=jQuery('#<{$dirname}>_groupMemberForm');
			jQuery('#<{$dirname}>_op').attr('value','search');
			form.attr('action','index.php?action=groupMember&membervalue=' + value);
			form.submit();
			return false;
		} /* callback called when closing the popin */
	});
});
function deleteUser(id){
	jQuery('#<{$dirname}>_memberid'+id).remove();
}
</script>
<form id="<{$dirname}>_groupMemberForm" name="<{$dirname}>_groupMemberForm" action="index.php?action=groupMember" method="post">
<{$token_ticket}>
<input type="hidden" id="<{$dirname}>_op" name="op" value="" />
<input type="hidden" id="<{$dirname}>_groupid" name="groupid" value="<{$group.groupid}>" />
<table class="outer" cellspacing="1" cellpadding="4">
 <tr>
  <td width="40%" class="head"><{$smarty.const._MD_USER_LANG_GROUP_NAME}></td>
  <td width="60%" class="<{cycle name="oddeven" values="odd,even"}>"><{$group.name|xoops_escape}></td>
 </tr>
 <tr>
  <td class="head"><{$smarty.const._MD_USER_LANG_GROUP_DESCRIPTION}></td>
  <td class="<{cycle name="oddeven"}>"><pre><{$group.description|xoops_escape}></pre></td>
 </tr>
 <tr>
  <td class="head"><{$smarty.const._MD_USER_LANG_GROUP_ADMIN}><br /></td>
  <td class="<{cycle name="oddeven"}>">
  	<{foreach item=admin from=$admins}>
  		<input type="hidden" name="adminid[]" value="<{$admin.uid}>" />
    	<{$admin.name|xoops_escape}><{if $admin.name}>(<{/if}><{$admin.uname|xoops_escape}><{if $admin.name}>)<{/if}><br />
 	<{/foreach}>
  </td>
 </tr>
 <tr>
  <td class="head"><{$smarty.const._MD_USER_LANG_GROUP_MEMBERS}><br /></td>
  <td class="<{cycle name="oddeven"}>">
  	<{foreach item=member from=$members}>
  	 	<div id="user_memberid<{$member.uid}>">
  		<input type="hidden" name="memberid[]" value="<{$member.uid}>" />
    	<{$member.name|xoops_escape}><{if $member.name}>(<{/if}><{$member.uname|xoops_escape}><{if $member.name}>)<{/if}>
    	<{if $member.deleteFlag}>
    	<a href="javascript:deleteUser(<{$member.uid}>);">
       		<img src="images/delete.gif" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
       	</a>
       	<{else}><{if $member.activate==1}> (Join Pending)<{elseif $member.activate==2}> (Leave Pending)<{/if}>
       	<{/if}>
       	<br />
       	</div>
 	<{/foreach}>
 	<input type="button" href="<{$smarty.const.XOOPS_URL}>/modules/<{$dirname}>/userselectsub.php?callbackid=1;1;1" rel="prettyPopin" value="<{$smarty.const._MD_USER_LANG_SEARCH}>"/> 
  </td>
 </tr>
</table>
<div style="text-align: center">
 <input type="button" value="<{$smarty.const._MD_USER_LANG_UPDATE}>" onclick="this.form.op.value='update';submit()"/>
 <input type="button" value="<{$smarty.const._MD_USER_LANG_BACK}>" onclick="this.form.action='index.php?action=groupList';submit()"/>
</div>
</form>
<{include file="db:user_footer.html"}>
