Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve design of the Foster Invite form using vertical form inputs #1301

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions app/views/organizations/staff/fosterer_invitations/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
<div class="card mb-4">
<div class="card-body">
<!-- form -->
<%= bootstrap_form_with model: user, url: invitation_path(user) do |form| %>
<div class="row gx-3">
<%= bootstrap_form_with model: user, url: invitation_path(user) do |form| %>
<div class="card">
<div class="card-header">
Foster Details
</div>

<div class="card-body">
<!-- form -->
<div class="vstack gap-4">
<!-- form group -->
<div class="mb-3 col-md-6 col-12">
<div class="input-group me-3">
<%= form.text_field :first_name, class: "form-control", required: true %>
</div>
<div class="input-group">
<%= form.text_field :first_name, class: "form-control", wrapper_class: "w-100", required: true %>
</div>

<!-- form group -->
<div class="mb-3 col-md-6 col-12">
<div class="input-group me-3">
<%= form.text_field :last_name, class: "form-control", required: true %>
</div>
<div class="input-group me-3">
<%= form.text_field :last_name, class: "form-control", wrapper_class: "w-100", required: true %>
</div>

<!-- form group -->
<div class="mb-3 col-12">
<div class="input-group">
<%= form.text_field :email, class: "form-control", required: true %>
</div>
<div class="input-group">
<%= form.text_field :email, class: "form-control", required: true, wrapper_class: "w-100" %>
</div>

<%= form.fields_for :person do |person_form| %>
<!-- form group -->
<div class="mb-3 col-12">
<div class="input-group">
<%= person_form.telephone_field :phone_number,
class: "form-control",
required: false
%>
</div>
<div class="input-group">
<%= person_form.telephone_field :phone_number,
class: "form-control",
wrapper_class: "w-100",
required: false
%>
</div>

<!-- form group -->
<div class="mb-3 col-12">
<div class="input-group">
<!-- Nested Form for Locations Table -->
<div class="form-group bigger" data-controller="country-state">
<%= person_form.fields_for :location, user.person.location do |location_form| %>
<%= render 'shared/location_fields', form: location_form %>
<% end %>
</div>
<div class="input-group">
<!-- Nested Form for Locations Table -->
<div class="form-group bigger w-100" data-controller="country-state">
<%= person_form.fields_for :location, user.person.location do |location_form| %>
<%= render 'shared/location_fields', form: location_form %>
<% end %>
</div>
</div>
<% end %>

<%= form.hidden_field :roles, value: :fosterer %>
<!-- button -->
<div class="col-12 mt-3">
<%= form.submit t("general.send_invite"), class: "btn btn-primary" %>
</div>
</div>
<% end %>
</div>

<div class="card-footer">
<%= form.submit t("general.send_invite"), class: "btn btn-primary" %>
</div>
</div>
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<%= render DashboardPageComponent.new(crumb: :invite_fosterer) do |c| %>
<% c.with_header_title { t("invite_fosterer") } %>
<% c.with_body do |b| %>
<%= render "organizations/staff/fosterer_invitations/form", user: @user %>
<div class='mx-auto' style='max-width: 600px'>
<%= render "organizations/staff/fosterer_invitations/form", user: @user %>
</div>
<% end %>
<% end %>
Loading