<div class="col-sm-1"></div>
<div class="col-sm-10">
	<form class="form" action="/spellList/new" method="POST">
		<div class="form-group">
			<label> Name</label>
			<input type="text" name="name" class="form-control" />
		</div>
		<div class="form-group">
			<% spells.sort((a,b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0))%> <%;var count = 0;%> <%spells.forEach(spell => { %>
			<div class="col-sm-4">
				<input type="checkbox" name="spell[<%=count%>]" value="<%=spell._id%>" />
				<label><%=spell.name%></label>
				<%count+=1%>
			</div>
			<%});%>
		</div>
		<button type="submit" class="btn btn-default">Create Spell List</button>
	</form>
</div>
