2020-08-04 02:37:49 +00:00
|
|
|
<style type="text/css">
|
|
|
|
.controls[data-toggle^="buttons-"] input[type="checkbox"] {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: block;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2020-08-04 03:05:28 +00:00
|
|
|
.controls[data-toggle^="buttons-"] .checkbox.inline.btn{
|
|
|
|
position: relative;
|
|
|
|
}
|
2020-08-04 02:37:49 +00:00
|
|
|
</style>
|
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">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.label t("title"), :class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<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">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.label t("calendar.note"), :class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<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>
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.check_box :all_day,:id=>"all_day_check", :checked => @all_day %> <%= t('calendar.all_day') %>
|
2014-12-27 11:52:47 +00:00
|
|
|
</label>
|
2014-12-16 11:40:15 +00:00
|
|
|
</div>
|
2014-12-27 11:52:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.label t("start_date"), :class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<%#= 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">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.label t("end_date"), :class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<%#= 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">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.label t("calendar.calendar"), :class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<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>
|
2020-08-04 02:37:49 +00:00
|
|
|
<!-- Tag Module -->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"><%= t(:tags) %></label>
|
|
|
|
<%= select_tags(f, @module_app) %>
|
|
|
|
</div>
|
|
|
|
|
2014-12-27 11:52:47 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label"></label>
|
|
|
|
<div class="controls">
|
|
|
|
<label>
|
2020-05-28 11:12:31 +00:00
|
|
|
<%= f.check_box :recurring, :id=>"recurring_checkbox", :checked => @recurring %> <%= t("calendar.recurring") %>
|
2014-12-27 11:52:47 +00:00
|
|
|
</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">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%=f.label :period, t("calendar.repeats"),:class=>"control-label" %>
|
2014-12-27 11:52:47 +00:00
|
|
|
<div class="controls">
|
2020-05-28 11:12:31 +00:00
|
|
|
<%=f.select :period, Event::REPEATS.map{|v| [t("calendar.#{v.downcase}"),v]},{},:class=>"span5" %>
|
2014-12-16 11:40:15 +00:00
|
|
|
</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>
|