<% if @host.restorable? %>
<% restore_point = @host.client.last_job_date_formatted %>
<%= bootstrap_form_tag(url: run_restore_host_path(@host), layout: :horizontal,
label_col: 'col-xs-4', control_col: 'col-xs-8' ) do |f| %>
<%= f.text_field(:restore_point, value: restore_point, disabled: true) %>
<%= f.text_field(:restore_location) %>
<%= f.submit 'Restore Files', class: 'btn btn-warning right',
data: { confirm: "This will restore all your files at the most recent backup (#{restore_point})" }
%>
<% end %>
<% else %>
Can not issue a restore for this host. It is either not deployed or has no successful backups
<% end %>
<%= link_to 'Cancel', client_path(@host.client), class: 'btn btn-danger', role: 'button' %>