memberlog/app/views/admin/dayoffs/_form.html.erb

87 lines
3.1 KiB
Plaintext
Raw Permalink Normal View History

2017-02-13 17:27:57 +00:00
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "lib/main-form-col2" %>
<style type="text/css">
.ui-helper-hidden-accessible{
display: none;
}
</style>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/file-type" %>
<%= javascript_include_tag "lib/module-area" %>
<% end %>
<!-- Input Area -->
<div class="input-area">
<!-- Module Tabs -->
<div class="nav-name"><strong><%= t(:module) %></strong></div>
<ul class="nav nav-pills module-nav">
<li class="active"><a href="#basic" data-toggle="tab"><%= t('memberlog.take_dayoff') %></a></li>
</ul>
<!-- Module -->
<div class="tab-content module-area">
<!-- Basic Module -->
<div class="tab-pane fade in active" id="basic">
<% if !@member.blank? %>
<div class="control-group">
<label class="control-label muted"><%= t("memberlog.staff") %></label>
<div class="controls">
<%= @member.name rescue ''%>
<%= f.hidden_field :member_profile_id, :value => @member.id %>
</div>
</div>
2017-03-27 02:44:36 +00:00
<div class="control-group"></div>
<% end %>
2017-02-13 17:27:57 +00:00
<!-- Dayoff Description -->
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :dayoff_description_translations do |f| %>
<div class="control-group">
<label class="control-label muted" for="dayoff_description<%= locale.to_s %>"><%= t(:description) + " (#{t(locale.to_s)})" %></label>
<div class="controls">
<%= f.text_field locale, value: (@dayoff.dayoff_description_translations[locale.to_s] rescue nil) %>
</div>
</div>
<% end %>
<% end %>
<!-- Date Time Picker -->
<div class="control-group">
<label class="control-label muted"><%= t('memberlog.start_dayoff') %></label>
<div class="controls">
<%= f.datetime_picker :start_dayoff, :no_label => true, :new_record => @dayoff.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
</div>
</div>
2017-02-21 10:21:35 +00:00
2017-02-13 17:27:57 +00:00
<div class="control-group">
<label class="control-label muted"><%= t('memberlog.end_dayoff') %></label>
<div class="controls">
<%= f.datetime_picker :end_dayoff, :no_label => true, :new_record => @dayoff.new_record?, :data=>{"picker-type" => "range", "range" => "end"} %>
</div>
</div>
</div>
</div>
</div>
<!-- Form Actions -->
<div class="form-actions">
<%= f.hidden_field :user_id, :value => params[:user_id] if !params[:user_id].blank? %>
<input type="hidden" name="referer_url" value="<%= request.referer %>">
<%= f.submit t('submit'), class: 'btn btn-primary' %>
<%= link_to t('cancel'), request.referer, :class=>"btn" %>
</div>