<%@ include file="/includes/taglibs.jsp"%>

<style>
<!--
	.errors{
		color: red;
	}
-->
</style>

<script type="text/javascript">
	function submitForm(methodName){
		var f = document.getElementById('twitterForm');
		var m = document.getElementById('methodVar');
		m.value=methodName
		f.submit();
	}
</script>


<div id="content">
	<h1>
		<c:out value="${TwitterLearnerTwitterForm.title}" escapeXml="false" />
	</h1>
	
	<p>
		<c:out value="Twitter" escapeXml="false" />
	</p>
	
	<c:if test="${not empty errors}">
		<p class="errors"><fmt:message key="${errors}"></fmt:message></p>
	</c:if>

	<html:form action="/twitter.do" styleId="twitterForm">
		<input type="hidden" id="mode" name="mode" value="${TwitterLearnerTwitterForm.mode}" />
		<input type="hidden" id="title" name="title" value="${TwitterLearnerTwitterForm.title}" />
		<input type="hidden" id="methodVar" name="method" value="login" />
		<input type="hidden" id="toolSessionID" name="toolSessionID" value="${TwitterLearnerTwitterForm.toolSessionID}" />
			<table>
				<tr style="width:20%">
					<td><fmt:message key="twitter.username"></fmt:message></td>
					<td><html:text property="twitterUsername"></html:text></td>
				</tr>
				<tr>
					<td><fmt:message key="twitter.password"></fmt:message></td>		
					<td><html:password property="twitterPassword"></html:password></td>
				</tr>
			</table>

			
			<html:link href="#" property="loginTwitterButton" styleClass="button"
				styleId="submitButton" onclick="submitForm('login')">
				<fmt:message key="twitter.login" />
			</html:link>
		</html:form>
</div>




