<%--
 * Copyright by Intland Software
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Intland Software. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Intland.
 *
 * $Revision$ $Date$
--%>

<%@ taglib uri="jstl-c" prefix="c" %>
<%@ taglib uri="jstl-fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>

<%@ taglib uri="uitaglib" prefix="ui" %>

<%@ page import="com.intland.codebeamer.utils.Common" %>

<c:if test="${empty undecorated}">
	<meta name="decorator" content="main">
	<meta name="module" content="admin">
	<meta name="stylesheet" content="admin.css">
	<meta name="breadcrumbStyle" content="menubar_admin">
</c:if>
<%
	pageContext.setAttribute("isLocalHost",
		Boolean.toString(Common.isLocalHost(request.getRemoteAddr())));
%>

<ui:actionMenuBar>
	<span class="titlenormal"><ui:pageTitle>Select Provider</ui:pageTitle></span>
</ui:actionMenuBar>

<style type="text/css">
<!--
	#scmForm label {
		font-weight: bold;
	}
-->
</style>

<form:form commandName="scmForm" action="${flowUrl}" id="scmForm">

<form:hidden path="projectId"/>

<spring:hasBindErrors name="scmForm">
	<ui:showSpringErrors errors="${errors}" />
</spring:hasBindErrors>

<div class="actionBar">
	<c:choose>
	<c:when test="${flowBlocked}">
	&nbsp;&nbsp;<input type="submit" class="blockedButton" name="_eventId_submit" value="Configure >" disabled="disabled" />
	</c:when>
	<c:otherwise>
	&nbsp;&nbsp;<input type="submit" class="button" name="_eventId_submit" value="Configure >" />
	</c:otherwise>
	</c:choose>
	<%-- &nbsp;&nbsp;<input type="submit" class="button" name="_eventId_cancel" value="Cancel" />--%>
</div>

<table border="0" cellspacing="1" cellpadding="2">

<tr valign="top">
	<td nowrap class="mandatory">&nbsp;Scm System:&nbsp;</td>

	<td nowrap="nowrap">
	<c:forEach var="scmSelect" items="${scmForm.availableScmSystems}">
		<form:radiobutton path="type" value="${scmSelect.key}" disabled="${scmSelect.value}" id="${scmSelect.key}" />
			<label class="<c:if test="${scmSelect.value}">notSelectable</c:if>" for="${scmSelect.key}">
				<fmt:message key="scc.name.${scmSelect.key}" />
			</label>
		<br/>
	</c:forEach>

	<c:if test="${!licenseCode.enabled.forceSvnScm}">
		<br />
		<form:radiobutton path="type" value="" disabled="${licenseCode.enabled.forceSvnScm}" id="none" />
		<label for="none"><fmt:message key="scc.name.none" /></label>
	</c:if>
	</td>
</tr>

</table>
</form:form>
