2014-12-27 11:52:47 +00:00
|
|
|
<% if @event.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
|
|
|
<h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>
|
|
|
|
<ul>
|
2014-12-16 11:40:15 +00:00
|
|
|
<% @event.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
2014-12-27 11:52:47 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :title, :class=>"control-label" %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<%= f.text_field :title %>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :note, :class=>"control-label" %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<%= f.text_area :note, :rows => 3 %>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label>
|
|
|
|
<%= f.check_box :all_day,:id=>"all_day_check", :checked => @all_day %> All Day
|
|
|
|
</label>
|
2014-12-16 11:40:15 +00:00
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :start, :class=>"control-label" %>
|
|
|
|
<%#= f.datetime_select :start %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
|
2014-12-27 11:52:47 +00:00
|
|
|
<%= f.text_field :start, :class => "input-large", data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty;"}, :placeholder => 'YYYY/MM/DD',:value => @start_d_t %>
|
2014-12-16 11:40:15 +00:00
|
|
|
<span class="add-on clearDate">
|
|
|
|
<i class="icons-cross-3"></i>
|
|
|
|
</span>
|
|
|
|
<span class="add-on iconbtn">
|
|
|
|
<i data-time-icon="icons-clock" data-date-icon="icons-calendar"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :end, :class=>"control-label" %>
|
|
|
|
<%#= f.datetime_select :end %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
|
2014-12-27 11:52:47 +00:00
|
|
|
<%= f.text_field :end, :class => "input-large", :placeholder => 'YYYY/MM/DD', :value => @end_d_t %>
|
|
|
|
<!-- <input type="text" placeholder="YYYY/MM/DD" class="input-large" name="event[end]"></input> -->
|
2014-12-16 11:40:15 +00:00
|
|
|
<span class="add-on clearDate">
|
|
|
|
<i class="icons-cross-3"></i>
|
|
|
|
</span>
|
|
|
|
<span class="add-on iconbtn">
|
|
|
|
<i data-time-icon="icons-clock" data-date-icon="icons-calendar"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label "Calendar", :class=>"control-label" %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<%= f.select :calendar_type_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label>
|
|
|
|
<%= f.check_box :recurring, :id=>"recurring_checkbox", :checked => @recurring %> Recurring
|
|
|
|
</label>
|
2014-12-16 11:40:15 +00:00
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div id="recurring_panel" <%= (@recurring ? '' : "style=display:none;") %> >
|
|
|
|
<div class="control-group">
|
|
|
|
<%=f.label :period, "Repeats",:class=>"control-label" %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<%=f.select :period, Event::REPEATS,{},:class=>"span5" %>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%=f.label :frequency, "Every",:class=>"control-label" %>
|
|
|
|
<div class="controls">
|
2014-12-16 11:40:15 +00:00
|
|
|
<%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
2014-12-16 11:40:15 +00:00
|
|
|
|
2014-12-27 11:52:47 +00:00
|
|
|
<div class="control-group last">
|
|
|
|
<div class="controls">
|
|
|
|
<% if action_name == "edit" %>
|
|
|
|
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
|
|
|
|
<% else %>
|
|
|
|
<%= f.submit t(:create_), :class=>"btn btn-primary" %>
|
|
|
|
<% end %>
|
|
|
|
<a href="" class="btn btn-close">Cancel</a>
|
2014-12-16 11:40:15 +00:00
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|