Page MenuHomeGRNET

_form.html.erb
No OneTemporary

File Metadata

Created
Wed, Sep 9, 7:37 PM

_form.html.erb

<%= bootstrap_form_for(@job, url: @job.new_record? ? host_jobs_path : host_job_path(@host, @job), layout: :horizontal, label_col: 'col-xs-4', control_col: 'col-xs-6') do |f| %>
<%= f.text_field :name %>
<div class="form-group<%= ' has-error' if @job.errors[:fileset_id].present? %>">
<%= label :job_template, :fileset_id, 'Fileset', class: 'control-label col-xs-4 required' %>
<div class="col-xs-6">
<%= select_tag(:job_template_fileset_id,
options_for_select(@host.filesets.pluck(:name, :id)),
name: 'job_template[fileset_id]',
class: 'form-control'
) %>
<% if @job.errors[:fileset_id].present? %>
<span class='help-block'>
<%= @job.errors[:fileset_id].first %>
</span>
<% end %>
</div>
<div class="col-xs-1">
<%= link_to 'Add', new_host_fileset_path(@host), class: 'btn btn-primary', role: 'button' %>
</div>
</div>
<% if !@job.restore? %>
<div class="form-group<%= ' has-error' if @job.errors[:schedule_id].present? %>">
<%= label :job_template, :schedule_id, 'Schedule Time', class: 'control-label col-xs-4' %>
<div class="col-xs-6">
<%= select_tag(:job_template_schedule_id,
options_for_select(@host.schedules.pluck(:name, :id)),
name: 'job_template[schedule_id]',
class: 'form-control'
) %>
<% if @job.errors[:schedule_id].present? %>
<span class='help-block'>
<%= @job.errors[:schedule_id].first %>
</span>
<% end %>
</div>
<div class="col-xs-1">
<%= link_to 'Add', new_host_schedule_path(@host), class: 'btn btn-primary', role: 'button' %>
</div>
</div>
<% end %>
<%= f.text_field :restore_location, label: 'Restore Location', placeholder: '/tmp/bacula' %>
<div class="form-group">
<div class="col-xs-offset-4 col-xs-8">
<%= f.submit class: "btn btn-success" %>
</div>
</div>
<% end %>

Event Timeline