Skip to content

Commit

Permalink
Merge pull request #5726 from JoshDevHub/5348_enter_contact_details_c…
Browse files Browse the repository at this point in the history
…ase_contact_form

Restyle Enter Contact Details form on case contact form
  • Loading branch information
compwron committed May 19, 2024
2 parents 9dea16d + 25fab2d commit bb074c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 7 additions & 5 deletions app/components/form/hour_minute_duration_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<div class="row align-items-center">
<div class="input-style-1 col pl-0">
<div class="d-flex flex-column flex-lg-row gap-2">
<div class="col input-style-1">
<%= @form.label :duration_hours, "Hour(s)" %>
<%= @form.number_field :duration_hours,
min: 0,
class: "cc-field",
class: "form-control",
size: "10",
style: "background:white",
value: @hour_value,
required: true %>
</div>
<div class="input-style-1 col">
<div class="col input-style-1">
<%= @form.label :duration_minutes, "Minute(s)" %>
<%= @form.number_field :duration_minutes,
min: 0,
class: "cc-field",
class: "form-control",
size: "10",
style: "background:white",
value: @minute_value,
required: true %>
</div>
Expand Down
10 changes: 5 additions & 5 deletions app/views/case_contacts/form/details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
</div>

<div id="enter-contact-details" class="card-style-1 pl-25 mb-10">
<h4 class="mb-3"><label>3. Enter Contact Details</label><span class="red-letter"> *</span></h4>
<h4 class="mb-3"><label>3. Record contact details</label><span class="red-letter"> *</span></h4>
<div class="">
<h5 classs="mb-3"><label>a. Contact Made</label></h5>
<h5 classs="mb-3"><label>a. Was contact made?</label></h5>
<div class="form-check radio-style mb-20">
<%= form.radio_button :contact_made, true,
checked: @case_contact.contact_made,
Expand All @@ -52,7 +52,7 @@
</div>

<div class="field contact-medium form-group">
<h5 classs="mb-3"><label>b. Contact Medium</label></h5>
<h5 classs="mb-3"><label>b. How was contact made?</label></h5>
<%= form.collection_radio_buttons(:medium_type, contact_mediums, 'value', 'label') do |b| %>
<div class="form-check radio-style mb-20">
<%= b.radio_button(class: "form-check-input") %>
Expand All @@ -62,7 +62,7 @@
</div>

<div class="pr-50">
<h5 class="mb-3"><%= form.label :occurred_at, "c. Occurred On" %></h5>
<h5 class="mb-3"><%= form.label :occurred_at, "c. Date of contact" %></h5>
<div class="input-style-1">
<% occurred_at = @case_contact.occurred_at || Time.zone.now %>
<%= render "layouts/components/ranged_date_picker",
Expand All @@ -72,7 +72,7 @@
</div>

<div class="pr-50 ">
<h5 class="mb-3"><label>d. Duration of Meeting</label></h5>
<h5 class="mb-3"><label>d. Duration of contact</label></h5>
<%= render(Form::HourMinuteDurationComponent.new(form: form, hour_value: duration_hours(@case_contact), minute_value: duration_minutes(@case_contact))) %>
</div>
</div>
Expand Down

0 comments on commit bb074c4

Please sign in to comment.