Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

85 lines (77 sloc) 3.629 kB
<% submission_path = @event.new_record? ? event_calendar_events_path : event_calendar_event_path(@event) %>
<div style="width: 550px;">
<%= semantic_form_for(@event, :url => submission_path) do |form| %>
<%= form.inputs do %>
<%= form.input :name, :hint => "the name of the event" %>
<%= form.input :event_type, :hint => "conference, meeting, training, etc" %>
<%= form.input :topic, :hint => "this topic will show up in hover-over text" %>
<li id="event_start_time_input" class="time optional">
<input id="event_start_time_1i" type="hidden" value="<%= Date.current.year %>" name="event[start_time(1i)]">
<fieldset>
<legend class="label">
<label for="event_start_time_1i">Start time</label>
</legend>
<ol>
<li>
<label for="event_start_time_4i">Hour</label>
<select id="event_start_time_4i" name="event[start_time(4i)]">
<%= options_for_select(hour_options, @event.start_hour) %>
</select>
</li>
<li>
<label for="event_end_time_5i">Minute</label>
<select id="event_end_time_5i" name="event[start_time(5i)]">
<%= options_for_select(minute_options, @event.start_min) %>
</select>
</li>
</ol>
</fieldset>
</li>
<%= form.input :start_date, :required => false, :as => :string,
:input_html => { :value => @event.start_date ? @event.start_date.to_s(:american) : '' } %>
<li id="event_end_time_input" class="time optional">
<input id="event_end_time_1i" type="hidden" value="<%= Date.current.year %>" name="event[end_time(1i)]">
<fieldset>
<legend class="label">
<label for="event_end_time_1i">End time</label>
</legend>
<ol>
<li>
<label for="event_end_time_4i">Hour</label>
<select id="event_end_time_4i" name="event[end_time(4i)]">
<%= options_for_select(hour_options, @event.end_hour) %>
</select>
</li>
<li>
<label for="event_end_time_5i">Minute</label>
<select id="event_end_time_5i" name="event[end_time(5i)]">
<%= options_for_select(minute_options, @event.end_min) %>
</select>
</li>
</ol>
</fieldset>
</li>
<%= form.input :end_date, :required => false, :as => :string,
:input_html => { :value => @event.end_date ? @event.end_date.to_s(:american) : '' } %>
<%= form.input :timezone, :as => :time_zone, :priority_zones => /^(Eastern|Central|Mountain|Pacific) Time/ %>
<%= form.input :facilitators, :hint => 'eg Sally Resonant, DSM WRRC' %>
<%= form.input :presenters, :hint => 'eg Jane Doe, DSM WRRC' %>
<%= form.input :location, :required => false, :hint => 'eg Portland, Oregon USA or http://some.webinar.org', :label => 'Location' %>
<%= form.input :description, :required => false, :label => 'Description' %>
<% unless @event.new_record? %>
<%= form.input :notes, :required => false, :label => 'Notes' %>
<% end %>
<% end %>
<%= form.submit %>
<% end %>
</div>
<% content_for :javascript do %>
<script type="text/javascript">
$(document).ready(function() {
$('#event_calendar_event_event_type').attach(SelectPopper, <%= "#{EventCalendar::Event.existing_event_types.to_json}".html_safe %>);
$('form.formtastic fieldset ol li.text textarea').attach(TextareaExpander, 40, 300);
$('#event_calendar_event_start_date').datepicker();
$('#event_calendar_event_end_date').datepicker();
});
</script>
<% end %>
Jump to Line
Something went wrong with that request. Please try again.