obdev/app/views/bank_accounts/_form.html.erb

60 lines
2.4 KiB
Plaintext

<%= form_with(model: [@owner, @bank_account], local: true, html: { class: 'needs-validation', novalidate: true }) do |form| %>
<% if @bank_account.errors.any? %>
<div id="error_explanation" class="alert alert-danger">
<h4><%= pluralize(@bank_account.errors.count, "error") %> prohibited this bank account from being saved:</h4>
<ul>
<% @bank_account.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="mb-3">
<%= form.label :institution_name, 'Institution Name', class: 'form-label' %>
<%= form.text_field :institution_name, class: 'form-control', placeholder: 'Institution Name' %>
</div>
<div class="mb-3">
<label class='form-label'>Account Type</label><br>
<%= form.radio_button :account_type, 'Checking', class: 'form-check-input' %>
<%= form.label :account_type_checking, 'Checking', class: 'form-check-label' %>
<%= form.radio_button :account_type, 'Savings', class: 'form-check-input' %>
<%= form.label :account_type_savings, 'Savings', class: 'form-check-label' %>
</div>
<div class="mb-3">
<%= form.label :routing_number, 'Routing Number', class: 'form-label' %>
<%= form.text_field :routing_number, class: 'form-control', placeholder: 'Routing Number' %>
</div>
<div class="mb-3">
<%= form.label :routing_number_confirmation, 'Re-enter Routing Number', class: 'form-label' %>
<%= form.text_field :routing_number_confirmation, class: 'form-control', placeholder: 'Re-enter Routing Number' %>
</div>
<div class="mb-3">
<%= form.label :account_number, 'Account Number', class: 'form-label' %>
<%= form.text_field :account_number, class: 'form-control', placeholder: 'Account Number' %>
</div>
<div class="mb-3">
<%= form.label :account_number_confirmation, 'Re-enter Account Number', class: 'form-label' %>
<%= form.text_field :account_number_confirmation, class: 'form-control', placeholder: 'Re-enter Account Number' %>
</div>
<div class="mb-3">
<%= form.label :start_date, 'Start Date', class: 'form-label' %>
<%= form.date_field :start_date, class: 'form-control' %>
</div>
<div class="mb-3">
<%= form.label :end_date, 'End Date', class: 'form-label' %>
<%= form.date_field :end_date, class: 'form-control' %>
</div>
<div class="actions">
<%= form.submit 'Submit', class: 'btn btn-dark' %>
</div>
<% end %>