diff --git a/app/views/jobs/_form.html.erb b/app/views/jobs/_form.html.erb index dfaadf8..bdc9bd2 100644 --- a/app/views/jobs/_form.html.erb +++ b/app/views/jobs/_form.html.erb @@ -1,49 +1,53 @@ <%= 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 %>
show advanced
-
- <%= f.submit class: "btn btn-success" %> +
+ <%= link_to 'Cancel', @job.persisted? ? host_job_path(@host, @job) : host_path(@job.host, anchor: :jobs), + class: 'btn btn-danger', role: 'button' %> +
+
+ <%= f.submit 'Submit', class: "btn btn-success" %>
<% end %> diff --git a/app/views/jobs/edit.html.erb b/app/views/jobs/edit.html.erb index 9ea285f..3786cc4 100644 --- a/app/views/jobs/edit.html.erb +++ b/app/views/jobs/edit.html.erb @@ -1,26 +1,24 @@

Edit Job Template <%= @job.name %>

Job Attributes


<%= render 'form' %>
- <%= link_to 'Cancel', host_job_path(@host, @job), class: 'btn btn-danger right', - role: 'button' %>
<% fileset = @fileset || @job.fileset %> <%= render partial: 'fileset', locals: { fileset: fileset } if fileset %>
<% schedule = @schedule || @job.schedule %> <%= render partial: 'schedule', locals: { schedule: schedule } if schedule %>
diff --git a/app/views/jobs/new.html.erb b/app/views/jobs/new.html.erb index 0790b0a..01cabd2 100644 --- a/app/views/jobs/new.html.erb +++ b/app/views/jobs/new.html.erb @@ -1,29 +1,23 @@

New Job Template

Job Attributes


<%= render 'form' %>
<% schedule = @schedule || @job.schedule %> <%= render partial: 'schedule', locals: { schedule: schedule } if schedule %>
- -
-
- <%= link_to 'Cancel', host_path(@job.host), class: 'btn btn-danger', role: 'button' %> -
-