Sha256: 6b09679fd67eda0f1a4052004a2f534a54551d9c3c31d2a2362d8535390a2a0d

Contents?: true

Size: 1.36 KB

Versions: 8

Compression:

Stored size: 1.36 KB

Contents

<% submission_path = @event.new_record? ? events_path : 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 :start_on, :required => false, :label => "Starting date of event", :as => :string,
          :input_html => { :value => @event.start_on.to_s } %>
    <%= form.input :end_on, :required => false, :label => "Ending date of event", :as => :string,
          :input_html => { :value => @event.end_on.to_s } %>
    <%= form.input :location, :required => false, :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_event_type').attach(SelectPopper, <%= "#{Event.existing_event_types.to_json}".html_safe %>);
    
    $('form.formtastic fieldset ol li.text textarea').attach(TextareaExpander, 40, 300);

    $('#event_start_on').datepicker();
    $('#event_end_on').datepicker();
  });
</script>

<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
event_calendar_engine-0.1.7 app/views/events/_form.html.erb
event_calendar_engine-0.1.6 app/views/events/_form.html.erb
event_calendar_engine-0.1.5 app/views/events/_form.html.erb
event_calendar_engine-0.1.4 app/views/events/_form.html.erb
event_calendar_engine-0.1.3 app/views/events/_form.html.erb
event_calendar_engine-0.1.2 app/views/events/_form.html.erb
event_calendar_engine-0.1.1 app/views/events/_form.html.erb
event_calendar_engine-0.1.0 app/views/events/_form.html.erb