<!DOCTYPE html>
<html lang="en" ng-app="applicationApp" ng-controller="applicationController">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="uli uli">
	<meta name="author" content="veedeeämkoo">

	<title>Jäseneksi Aalto-yliopiston Sähköinsinöörikiltaan</title>
	
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
	<link href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" rel = "stylesheet">
	<script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.6/angular.js"></script>
	<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
	{%load staticfiles %}
	<script src="/static/js/jquery.noty.packaged.js"></script>
    <script src="/static/js/application_controllers.js"></script>
    <!-- reCaptcha -->
    <script src="https://www.google.com/recaptcha/api.js?onload=vcRecaptchaApiLoaded&render=explicit" async defer></script>
    <script src="/static/js/angular-recaptcha.js"></script>
</head>
<body>
	<h2>Killan jäseneksi liittyminen on helppoa ja hauskaa. Täytä vain alla oleva lomake.</h2>
	<h2>Muista myös maksaa jäsenmaksusi!</h2>
	<div id="input_form">
		<form name="applicationForm">
			<div class="form-group">
			<label>Etunimi: </label>
                <input id="firstNameField" required type="text" placeholder="Sähkö" class="form-control" ng-model="member.first_name"></input>
            </div>
			<div class="form-group">
            <label>Sukunimi: </label>    
                <input id="lastNameField" required type="text" placeholder="Insinööri" class="form-control" ng-model="member.last_name"></input>
            </div>
			<div class="form-group">
			<label>Sähköposti: </label>
			<input id="emailField" required type="text" placeholder="sahko.insinoori@aalto.fi" class="form-control" ng-model="member.email"></input>
			</div>
			<!--<div class="form-group">
			<label>Vuosikurssi: </label>
			<select name="year" ng-model="year">
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
				<option value="4">4</option>
				<option value="n">N</option>
			</select>
			</div>-->
			<div class="form-group">
			<label>Olen AYY:n jäsen: </label>
			<input type="checkbox" id="AYY" value="0" ng-model="member.AYY"></input>
			</div>
			<div class="form-group">
			<label>Haluan saada viikottaisia jäsenmaileja: </label>
			<input type="checkbox" id="JAS" value="0" ng-model="member.jas"></input>
			</div>
			<div class="form-group">
			<label>Asuinkunta: </label>
			<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="member.POR"></input>
			</div>
            <div 
                vc-recaptcha
                theme="'light'"
                key="'6LevHAcUAAAAAA45B7c-7qja-2aSwHztr9xb4K2Z'"
                on-create="setWidgetId(widgetId)"
                on-success="setResponse(response)"
                on-expire="cbExpiration()"
            ></div>
			<button ng-click="applicationForm.$valid && send()" type="submit" class="btn btn-success" id="sendmember">Tallenna</button>
		</form>
	</div>
</body>
