Page MenuHomeGRNET

_form.html.erb
No OneTemporary

File Metadata

Created
Sun, Aug 10, 5:43 AM

_form.html.erb

<%= bootstrap_form_for(@schedule, url: url, method: method, layout: :horizontal,
label_col: 'col-xs-3', control_col: 'col-xs-8') do |f| %>
<%= f.text_field :name, required: true %>
<hr />
<% if ['schedule_runs.day','schedule_runs.month','scheduled_runs.time'] - @schedule.errors.keys %>
<div id="error_explanation" class="has-error">
<ul>
<% @schedule.errors.full_messages.each do |message| %>
<li><span class="help-block"><%= message %></span></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.fields_for :schedule_runs, @schedule.schedule_runs do |r| %>
<div class="schedule_run_form">
<%= r.select :level, options_for_select(ScheduleRun.options_for_select, r.object.level) %>
<%= r.text_field :month, placeholder: '[month | month-range]' %>
<p class="col-xs-10 col-xs-offset-1 help-block text-right">eg: jan-mar, feb, monthly</p>
<%= r.text_field :day, placeholder: '[week | week-range] day | day-range',
required: true %>
<p class="col-xs-10 col-xs-offset-1 help-block text-right">
eg: first sun, second-fifth mon, mon-sat
</p>
<%= r.text_field :time, placeholder: 'HH:MM', required: true %>
<hr />
</div>
<% end %>
<div class="col-xs-1 col-xs-offset-10">
<%= link_to '#', class: 'schedule_run_form_remove', style: 'display:none;' do %>
<span class="glyphicon glyphicon-remove text-danger"></span>
<% end %>
</div>
<div class="col-xs-1 col-xs-offset-10">
<%= link_to '#', class: 'schedule_run_form_plus' do %>
<span class="glyphicon glyphicon-plus text-success"></span>
<% end %>
</div>
<%= (hidden_field_tag :job_id, @job_id) if @job_id %>
<div class="form-group">
<div class="col-xs-offset-3 col-xs-8">
<%= f.submit class: 'btn btn-success' %>
</div>
</div>
<% end %>

Event Timeline