<%= form_for @timer, url: update_timer_admin_ruling_timer_path(@timer), html: {class: "form-horizontal main-forms previewable"} do |f| %>

<%= @timer.date.split(" ")[0] + " " + @weekdays[@timer.date.split(" ")[1].to_i] %>

<% if @timer.class == RulingTimerTemp %> <% end %>
<%= f.text_area :summary,:id=>"edit_summary" %>
<% work_times = @timer.get_work_times(true) %> <% work_times.each_with_index do |t,i| %> <% if i % 2 == 0 next_t = work_times[i+1] else next end %> <%= f.text_field_tag "#{f.object_name}[work_times][]", t ,:id=>nil %> ~ <%= f.text_field_tag "#{f.object_name}[work_times][]", next_t ,:id=>nil %>
<% end %>
<% referer = request.referer rescue nil %> <% referer = get_referer_url if referer.blank? || request.host != URI.parse(URI.encode(referer)).host %> <%= f.submit t('submit'), class: 'btn btn-primary' %> <%= link_to t('cancel'), referer, :class=>"btn" %>
<% end %>