app/views/mileage_rates/_form.html.erb
<div class="title-wrapper pt-30">
<div class="row align-items-center">
<div class="col-md-6">
<div class="title mb-30">
<h1>
<%= title %>
</h1>
</div>
</div>
</div>
</div><!-- ==== end title ==== -->
<!-- ========== card start ========== -->
<div class="card-style mb-30">
<%= form_with(model: mileage_rate, local: true, id: :new_mileage_rate) do |form| %>
<div class="alert-box danger-alert">
<%= render "/shared/error_messages", resource: mileage_rate %>
</div>
<div class="input-style-1">
<%= form.label :effective_date, 'Effective date' %>
<%= form.date_field :effective_date,
value: mileage_rate.effective_date,
class: "form-control" %>
</div>
<div class="input-style-1">
<%= form.label :amount, 'Amount' %>
<%= form.number_field :amount,
required: true,
placeholder: '0.0',
min: 0,
step: 0.01,
class: "form-control",
aria: { label: "Amount in US Dollars" } %>
</div>
<div class="form-check checkbox-style mb-20">
<%= form.check_box :is_active, class: 'form-check-input' %>
<%= form.label :is_active, "Currently active?", class: "form-check-label" %>
</div>
<div class="actions mb-10">
<%= form.submit "Save Mileage Rate", class: "main-btn primary-btn btn-hover" %>
</div>
<% end %>
</div>
<!-- card end -->