<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<html>          
 					<div id="oa_config_businessservice" class="oa_config_block">
						<h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.business.header", request) %></h3>
						
						<s:select list="targetConfig.identificationTypeList"
											key="webpages.oaconfig.general.business.value"
											labelposition="left"
											cssClass="selectfield"
											value="%{targetConfig.identificationType}"
											name="targetConfig.identificationType"
											disabled="%{isDeaktivededBusinessService()}">
						</s:select>
						
						<s:textfield name="targetConfig.identificationNumber" 
							value="%{targetConfig.identificationNumber}" 
							cssClass="textfield_middle"
							disabled="%{isDeaktivededBusinessService()}">
						</s:textfield>		
					</div>
					
					<s:if test="!isOnlyBusinessService()">
						<div id="oa_config_publicservice" class="oa_config_block">
							<h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.public.header", request) %></h3>
							
							<s:if test="authUser.isAdmin()">
								<s:select list="targetConfig.targetList"
													key="webpages.oaconfig.general.target"
													labelposition="left"
													cssClass="selectfield"
													value="%{targetConfig.target}"
													name="targetConfig.target"
													onchange="HideAdminTarget();">
								</s:select>						
							</s:if>
							<s:else>
								<s:select list="targetConfig.targetList"
													key="webpages.oaconfig.general.target"
													labelposition="left"
													cssClass="selectfield"
													value="%{targetConfig.target}"
													name="targetConfig.target">
								</s:select>
							</s:else>
							
							<s:checkbox name="targetConfig.subTargetSet" 
								value="%{targetConfig.subTargetSet}"
								labelposition="left"
								key="webpages.oaconfig.general.target.subsector.checkbox"
								cssClass="checkbox"
								onclick="oaTargetSubSector();"
								id="OAisTargetSubSector">
							</s:checkbox>
							
							<s:textfield name="targetConfig.target_subsector" 
								value="%{targetConfig.target_subsector}" 
								labelposition="left"
								key="webpages.oaconfig.general.target.subsector"
								cssClass="selectfield"
								id="OAtarget_subsector">
							</s:textfield>
							
							
	 						<s:if test="authUser.isAdmin()">
	 							<s:checkbox
		 							name="targetConfig.AdminTarget" 
									value="%{targetConfig.AdminTarget}"
									cssClass="checkbox"
	 								onclick="AdminTarget();"
	 								labelposition="left"
									key="webpages.oaconfig.general.target.admin.checkbox"
									id="adminTarget">
	 							</s:checkbox>
	 							
	 							<div id="admin_target_area">
									<s:textfield name="targetConfig.target_admin" 
										value="%{targetConfig.target_admin}" 
										labelposition="left"
										key="webpages.oaconfig.general.target.admin"
										cssClass="textfield_short">
									</s:textfield>
									<s:textfield name="targetConfig.targetFriendlyName" 
										value="%{targetConfig.targetFriendlyName}" 
										labelposition="left"
										key="webpages.oaconfig.general.target.friendlyname"
										cssClass="textfield_long">
									</s:textfield>
								</div>
	 						</s:if>
	 						<s:else>
	 							<s:if test="targetConfig.target_admin neq null">
	 								<s:textfield name="targetConfig.target_admin" 
										value="%{targetConfig.target_admin}" 
										labelposition="left"
										key="webpages.oaconfig.general.target.admin.disabled"
										cssClass="textfield_short"
										disabled="true">
									</s:textfield>
								</s:if>
	<%-- 							<s:if test="targetConfig.targetFriendlyName neq null">
									<s:textfield name="targetConfig.targetFriendlyName" 
										value="%{targetConfig.targetFriendlyName}" 
										labelposition="left"
										key="webpages.oaconfig.general.target.friendlyname.disabled"
										cssClass="textfield_long">
									</s:textfield>
								</s:if> --%>
	 						</s:else>
						</div>
					</s:if>
					
										
					<div id="oa_config_foreignbPKArea" class="oa_config_block">
						<h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.neweid.header", request) %></h3>
						
						<s:checkbox name="targetConfig.eidDemoActive" 
								value="%{targetConfig.eidDemoActive}"
								labelposition="left"
								key="webpages.oaconfig.general.neweid.activate"
								cssClass="checkbox">
						</s:checkbox>
						
						<s:textarea name="targetConfig.foreignbPKTargets" 
									value="%{targetConfig.foreignbPKTargets}" 
									labelposition="left"
									key="webpages.oaconfig.general.foreign.sectors"
									cssClass="textfield_long"
									rows="6"								
									requiredLabel="true"
									style="height:120px;">								
						</s:textarea>
						
						<s:textarea name="targetConfig.additionalbPKTargets" 
									value="%{targetConfig.additionalbPKTargets}" 
									labelposition="left"
									key="webpages.oaconfig.general.additionalbpks.sectors"
									cssClass="textfield_long"
									rows="6"								
									requiredLabel="true"
									style="height:120px;">								
						</s:textarea>
					
					</div>
					

</html>