2024-01-30 17:11:13 -06:00
|
|
|
<div class="container mt-5">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h1 class="mb-4 text-center">Edit Employment</h1>
|
2024-01-23 00:14:10 -06:00
|
|
|
|
2024-01-30 17:11:13 -06:00
|
|
|
<%= form_with(model: @employment, url: employment_path(@employment), method: :patch, local: true, html: { class: 'needs-validation', novalidate: true }) do |form| %>
|
|
|
|
<% if @employment.errors.any? %>
|
|
|
|
<div id="error_explanation" class="alert alert-danger" role="alert">
|
|
|
|
<h4><%= pluralize(@employment.errors.count, "error") %> prohibited this employment from being saved:</h4>
|
|
|
|
<ul>
|
|
|
|
<% @employment.errors.full_messages.each do |message| %>
|
|
|
|
<li><%= message %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2024-01-23 00:14:10 -06:00
|
|
|
|
2024-01-30 17:11:13 -06:00
|
|
|
<div class="mb-3">
|
|
|
|
<%= form.label :start_date, class: 'form-label' %>
|
|
|
|
<%= form.date_field :start_date, class: 'form-control' %>
|
|
|
|
</div>
|
2024-01-23 00:14:10 -06:00
|
|
|
|
2024-01-30 17:11:13 -06:00
|
|
|
<div class="mb-3">
|
|
|
|
<%= form.label :end_date, class: 'form-label' %>
|
|
|
|
<%= form.date_field :end_date, class: 'form-control' %>
|
|
|
|
</div>
|
2024-01-23 00:14:10 -06:00
|
|
|
|
2024-01-30 17:11:13 -06:00
|
|
|
<div class="actions">
|
|
|
|
<%= form.submit "Update Employment", class: 'btn btn-dark' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2024-01-23 19:14:58 -06:00
|
|
|
|
2024-01-30 17:11:13 -06:00
|
|
|
<div class="mt-3 d-flex justify-content-between">
|
|
|
|
<%= link_to 'Back to Participant', participant_path(@employment.participant), class: 'btn btn-secondary' %>
|
|
|
|
<%= link_to 'Delete Employment', employment_path(@employment), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|