<div class="modal-body">
<div class="event_controller">
<!-- <form class="form-horizontal"> -->
	<%= form_for @event, :url =>{:action => :create}, :class=>"form-horizontal", :remote => true do |f| %>
	<div class="row-fluid">
		<button type="button" class="close btn-close" data-dismiss="modal" aria-hidden="true">×</button>
	</div>
	<div class="row-fluid">
		<%= f.text_field :title, :class=>"span12", :placeholder => "Event Name" %>
	</div>
	<div class="row-fluid">
		<% if !@all_day_disabled %>
			<label class="checkbox inline">
				<input type="checkbox" name="all_day" for="all_day"> All day
			</label>
		<% end %>
		<label class="checkbox inline">
			<input type="checkbox"> Repeat
		</label>
	</div>
	<div id="non_all_day">
		<div class="row-fluid">
			<label class="control-label span3">From</label>
			<div class="row-fluid span9">
				<input class="span5" id="dpfrom" type="text" value="<%= @placeholder %>" name="start_date" placeholder="<%= @placeholder %>">
				<select name="start_time" class="span4">
					<% @hours.each_with_index do |hour,i| %>
						<% if i == @sindex %>
							<option value="<%= hour['val'] %>" selected="selected"><%= hour['title'] %></option>
						<% else %>
							<option value="<%= hour['val'] %>" ><%= hour['title'] %></option>
						<% end %>
					<% end %>
				</select>
				<select name="start_am_pm" class="span3">
					<% @ampm.each do |a| %>
						<% if @sampm == a %>
							<option value="<%= a %>" selected="selected"><%= a %></option>
						<% else %>
							<option value="<%= a %>"><%= a %></option>	
						<% end %>
					<% end %>
				</select>
			</div>
		</div>
		<div class="row-fluid">
			<label class="control-label span3">To</label>
			<div class="row-fluid span9">
				<input class="span5" id="dpto" type="text" name="end_date" value="<%= @placeholder %>" placeholder="<%= @placeholder %>">
				<select name="end_time" class="span4">
					<% @hours.each_with_index do |hour,i| %>
						<% if i == @eindex %>
							<option value="<%= hour['val'] %>" selected="selected"><%= hour['title'] %></option>
						<% else %>
							<option value="<%= hour['val'] %>" ><%= hour['title'] %></option>
						<% end %>
					<% end %>
				</select>
				<select name="end_am_pm" class="span3">
					<% @ampm.each do |a| %>
						<% if @eampm == a %>
							<option value="<%= a %>" selected="selected"><%= a %></option>
						<% else %>
							<option value="<%= a %>"><%= a %></option>	
						<% end %>
					<% end %>
				</select>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<label for="" class="control-label span3">Calendars</label>
		<div class="row-fluid span9">
			<%= f.select(:cal_id, Cal.all.collect {|p| [ p.name, p.id ] },{:prompt => t("calendar.select_calendar")},:class => "validate") %>
		</div>
	</div>
	<div class="row-fluid">
		<label for="" class="control-label span3">Tags</label>
		<div class="row-fluid span9 dropdown">
			<button id="open_tags_panel" class="btn">Choose Tags</button>
			<div id="tags_panel" class="dropdown-menu my_scroll">
				<div class="scrollbar">
					<div class="track">
						<div class="thumb">
							<div class="end"></div>
						</div>
					</div>
				</div>
				<div class="viewport">
					<div class="overview">
						<ul id="tags_list" class="unstyled">
							<li><label for="" class="checkbox"><input type="checkbox"> tag1</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag2</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag3</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag4</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag5</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag6</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag7</label></li>
							<li><label for="" class="checkbox"><input type="checkbox"> tag8</label></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<label for="" class="control-label span3">Note</label>
		<div class="row-fluid span9">
			<%= f.text_area :note, :class=>"span12", :cols=>"30", :rows=>"3" %>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span9 offset3">
			<button class="btn btn-close">Cancel</button>
			<%= f.submit t("calendar.create"), :class=>"btn" %>
		</div>
	</div>
<% end %>
<!-- </form> -->
</div>
</div>