101 lines
3.4 KiB
Plaintext
101 lines
3.4 KiB
Plaintext
<% if @event.errors.any? %>
|
|
<div id="error_explanation">
|
|
<h2><%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:</h2>
|
|
<ul>
|
|
<% @event.errors.full_messages.each do |msg| %>
|
|
<li><%= msg %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
<div class="control-group">
|
|
<%= f.label :title, :class=>"control-label" %>
|
|
<div class="controls">
|
|
<%= f.text_field :title %>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label :note, :class=>"control-label" %>
|
|
<div class="controls">
|
|
<%= f.text_area :note, :rows => 3 %>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label :start, :class=>"control-label" %>
|
|
<%#= f.datetime_select :start %>
|
|
<div class="controls">
|
|
<div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
|
|
<%= f.text_field :start, :class => "input-large", data: {"fv-validation" => "required;","fv-messages" => "Cannot be empty;"}, :placeholder => 'YYYY/MM/DD',:value => @start_d_t %>
|
|
<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>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label :end, :class=>"control-label" %>
|
|
<%#= f.datetime_select :end %>
|
|
<div class="controls">
|
|
<div data-date-format="yyyy/MM/dd hh:mm" data-language="en" data-picktime="true" class="input-append datetimepick">
|
|
<%= 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> -->
|
|
<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>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= f.label "Calendar", :class=>"control-label" %>
|
|
<div class="controls">
|
|
<%= f.select :calendar_type_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
<div id="recurring_panel" <%= (@recurring ? '' : "style=display:none;") %> >
|
|
<div class="control-group">
|
|
<%=f.label :period, "Repeats",:class=>"control-label" %>
|
|
<div class="controls">
|
|
<%=f.select :period, Event::REPEATS,{},:class=>"span5" %>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%=f.label :frequency, "Every",:class=>"control-label" %>
|
|
<div class="controls">
|
|
<%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
</div>
|