Page MenuHomeGRNET

_form.html.erb
No OneTemporary

File Metadata

Created
Sun, May 18, 12:42 AM

_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-5', control_col: 'col-xs-5') do |f| %>
<%= f.text_field :name %>
<%= select_with_errors_and_button(
@job, :job_template, :fileset_id, 'Fileset',
options_from_collection_for_select(
@host.filesets, :id, :name, params[:fileset_id] || @job.fileset_id),
new_host_fileset_path(@host, job_id: @job.id))
%>
<% if !@job.restore? %>
<%= select_with_errors_and_button(
@job, :job_template, :schedule_id, 'Schedule',
options_from_collection_for_select(
@host.schedules, :id, :name, params[:schedule_id] || @job.schedule_id),
new_host_schedule_path(@host, job_id: @job.id))
%>
<% end %>
<div class="form-group">
<a id="toggle-advanced" class="col-xs-5 col-xs-offset-5" href="#">show advanced</a>
</div>
<div id="advanced" class="hidden">
<%= f.text_field :client_before_run_file,
label: tooltip_label('Client Run Before Job',
'A command that the backed up server will run right before the backup job starts') %>
<%= f.text_field :client_after_run_file,
label: tooltip_label('Client Run After Job',
'A command that the backed up server will run after the backup job has finished') %>
</div>
<div class="form-group">
<div class="col-xs-2 col-xs-offset-7">
<%= link_to 'Cancel', @job.persisted? ? host_job_path(@host, @job) : host_path(@job.host, anchor: :jobs),
class: 'btn btn-danger', role: 'button' %>
</div>
<div class="col-xs-2">
<%= f.submit 'Submit', class: "btn btn-success" %>
</div>
</div>
<% end %>
<script type='text/javascript'>
var hostId=<%= @host.id %>;
var jobIdParam={};
<% if @job.id %>
jobIdParam= { job_id: <%= @job.id %> };
<% end %>
</script>

Event Timeline