<%@ include file="taglib.inc.jsp" %>

<logic:notEqual name="form" property="partMappingsEmpty" value="true">
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
	<tr><td class="tableheader">Workflow-Teilnehmer</td><td class="tableheader">&#160;</td><td class="tableheader">Benutzer</td><td class="tableheader">Gruppe</td></tr>
	<logic:iterate id="mapping" name="form" property="partMappings" indexId="mIndex" type="vkc.workflow.model.MappingInfo">
	<html:hidden name="form" property='<%="partMappings["+mIndex+"].pkgId"%>'/>
	<html:hidden name="form" property='<%="partMappings["+mIndex+"].procDefId"%>'/>
	<html:hidden name="form" property='<%="partMappings["+mIndex+"].participantId"%>'/>
	<tr>
	<td><vkc:write name="mapping" property="participantName"/></td>
	<td>---&gt;</td>
	<td>
		<html:radio name="form" property='<%="partMappings["+mIndex+"].groupUser"%>' value="false"/>&#160;
		<html:select name="form" property='<%="partMappings["+mIndex+"].user"%>' size="1">
      		<bean:define id="users" name="form" property="userInfos"/>
      		<vkc:options collection="users" property="username" labelProperty="fullName"/>
      	</html:select>
	</td>
	<td>
		<html:radio name="form" property='<%="partMappings["+mIndex+"].groupUser"%>' value="true"/>&#160;
		<html:select name="form" property='<%="partMappings["+mIndex+"].group"%>' size="1">
      		<bean:define id="groups" name="form" property="groupInfos"/>
      		<vkc:options collection="groups" property="name" labelProperty="name"/>
      	</html:select>
	</td>
	</tr>							
	</logic:iterate>
	<tr><td colspan="4" align="right">
		<vkc:button property="action.save" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="wf.button.save"/></vkc:button>&#160;
		<html:reset><vkc:message key="wf.button.reset"/></html:reset></td></tr>
</table>
</logic:notEqual>
<logic:equal name="form" property="partMappingsEmpty" value="true">
<span class="error">Keine Workflow-Teilnehmer definiert.</span>
</logic:equal>