renalware-core 2.0.148 → 2.0.149

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/renalware/components/session_timeout_redirect.js.erb +26 -21
  3. data/app/assets/javascripts/renalware/core.js.erb +2 -0
  4. data/app/assets/javascripts/renalware/rollup_compiled.js +169 -0
  5. data/app/assets/stylesheets/renalware/partials/_simple_form.scss +2 -2
  6. data/app/components/renalware/hd/administer_prescription_dropdown_component.html.slim +1 -1
  7. data/app/controllers/renalware/base_controller.rb +3 -3
  8. data/app/controllers/renalware/session_timeout_controller.rb +20 -17
  9. data/app/javascript/renalware/controllers/session_controller.js +223 -0
  10. data/app/javascript/renalware/index.js +2 -0
  11. data/app/models/renalware/accesses/assessment.rb +5 -1
  12. data/app/models/renalware/accesses/procedure.rb +4 -1
  13. data/app/models/renalware/accesses/profile.rb +4 -1
  14. data/app/models/renalware/clinical/body_composition.rb +4 -1
  15. data/app/models/renalware/clinical/dry_weight.rb +4 -1
  16. data/app/models/renalware/clinics/clinic_visit.rb +5 -1
  17. data/app/models/renalware/hd/preference_set.rb +4 -1
  18. data/app/models/renalware/hd/profile.rb +5 -2
  19. data/app/models/renalware/hd/session.rb +4 -1
  20. data/app/models/renalware/low_clearance/profile.rb +5 -2
  21. data/app/models/renalware/medications/prescription.rb +4 -2
  22. data/app/models/renalware/pathology/code_group.rb +3 -1
  23. data/app/models/renalware/pathology/code_group_membership.rb +4 -1
  24. data/app/models/renalware/patient.rb +4 -1
  25. data/app/models/renalware/patients/worry.rb +5 -1
  26. data/app/models/renalware/problems/problem.rb +5 -1
  27. data/app/models/renalware/renal/aki_alert.rb +4 -1
  28. data/app/models/renalware/renal/profile.rb +4 -1
  29. data/app/models/renalware/transplants/donation.rb +4 -2
  30. data/app/models/renalware/transplants/donor_followup.rb +4 -2
  31. data/app/models/renalware/transplants/donor_operation.rb +4 -2
  32. data/app/models/renalware/transplants/donor_workup.rb +4 -2
  33. data/app/models/renalware/transplants/recipient_followup.rb +5 -2
  34. data/app/models/renalware/transplants/recipient_operation.rb +5 -2
  35. data/app/models/renalware/transplants/recipient_workup.rb +5 -2
  36. data/app/models/renalware/transplants/registration.rb +5 -2
  37. data/app/models/renalware/transplants/rejection_episode.rb +1 -1
  38. data/app/models/renalware/ukrdc/{batch_number.rb → batch.rb} +1 -1
  39. data/app/models/renalware/ukrdc/create_encrypted_patient_xml_files.rb +7 -10
  40. data/app/models/renalware/ukrdc/create_patient_xml_file.rb +3 -4
  41. data/app/models/renalware/ukrdc/housekeeping/remove_old_export_archive_folders.rb +3 -3
  42. data/app/models/renalware/ukrdc/housekeeping/remove_stale_files.rb +2 -2
  43. data/app/models/renalware/ukrdc/incoming/import_surveys.rb +1 -2
  44. data/app/models/renalware/ukrdc/transmission_log.rb +3 -2
  45. data/app/presenters/renalware/user_session_presenter.rb +44 -0
  46. data/app/views/renalware/admissions/consults/_form.html.slim +19 -18
  47. data/app/views/renalware/hd/prescription_administrations/_form.html.slim +1 -1
  48. data/app/views/renalware/hd/prescription_administrations/_row.html.slim +1 -1
  49. data/app/views/renalware/hd/prescription_administrations/new.js.erb +1 -1
  50. data/app/views/renalware/hd/protocols/_protocol.pdf.slim +39 -38
  51. data/app/views/renalware/hd/scheduling/diary_slots/_slot.html.slim +2 -1
  52. data/app/views/renalware/hd/witnesses/_form.html.slim +2 -2
  53. data/app/views/renalware/letters/contacts/_contact.html.slim +1 -1
  54. data/app/views/renalware/letters/letters/index.html.slim +4 -0
  55. data/app/views/renalware/medications/prescriptions/index.html.slim +1 -1
  56. data/app/views/renalware/navigation/_sign_out.html.slim +5 -1
  57. data/app/views/renalware/patients/patients/show/_primary_care_physician.html.slim +1 -1
  58. data/app/views/renalware/transplants/wait_lists/show.html.slim +1 -1
  59. data/config/initializers/paper_trail.rb +1 -1
  60. data/config/initializers/simple_form_wrappers.rb +14 -9
  61. data/config/routes/system.rb +2 -1
  62. data/db/migrate/20200408131217_associate_batch_with_ukrdc_transmission_log.rb +15 -0
  63. data/db/seeds/seeds_helper.rb +8 -2
  64. data/lib/renalware/configuration.rb +6 -0
  65. data/lib/renalware/engine.rb +2 -1
  66. data/lib/renalware/version.rb +1 -1
  67. data/spec/support/shared_examples/supersedable_examples.rb +2 -2
  68. metadata +22 -7
@@ -9,11 +9,10 @@ module Renalware
9
9
  pattr_initialize [
10
10
  :patient!,
11
11
  :dir!,
12
- :request_uuid!,
13
12
  :schema!,
14
13
  :changes_since,
15
14
  :logger,
16
- :batch_number,
15
+ :batch,
17
16
  :renderer, # so we can pass a test renderer to bypass real rendering
18
17
  :log,
19
18
  :force_send
@@ -24,7 +23,7 @@ module Renalware
24
23
  # send. This is primarily for debugging and testing phases with UKRDC
25
24
  def call
26
25
  update_patient_to_indicated_we_checked_them_for_any_relevant_changes
27
- UKRDC::TransmissionLog.with_logging(patient, request_uuid) do |log|
26
+ UKRDC::TransmissionLog.with_logging(patient: patient, batch: batch) do |log|
28
27
  @log = log
29
28
  logger.info " Patient #{patient.ukrdc_external_id}"
30
29
  xml_payload = build_payload(log)
@@ -117,7 +116,7 @@ module Renalware
117
116
  end
118
117
 
119
118
  def xml_filepath
120
- xml_filename = Filename.new(patient: patient, batch_number: batch_number).to_s
119
+ xml_filename = Filename.new(patient: patient, batch_number: batch.number).to_s
121
120
  File.join(dir, xml_filename)
122
121
  end
123
122
 
@@ -8,7 +8,7 @@ module Renalware
8
8
  module Housekeeping
9
9
  # Responsible for cleaning up old archive folders that are created each time the
10
10
  # ukrdc:export task has run. Each archive folder's name has a batch number in it which is the
11
- # id of the UKRDC::BatchNumber model created at the start of each export. We can find the
11
+ # id of the UKRDC::Batch model created at the start of each export. We can find the
12
12
  # folders to remove by extracting the batch number from the folder name and deleting the
13
13
  # folder if that batch is no longer 'recent'.
14
14
  # Called from a housekeeping rake task.
@@ -64,12 +64,12 @@ module Renalware
64
64
  Renalware.config.ukrdc_number_of_archived_folders_to_keep.to_i
65
65
  end
66
66
 
67
- # Returns the ids of a few of the most recent BatchNumbers rows (ie the batch number) that
67
+ # Returns the ids of a few of the most recent Batch rows (ie the batch number) that
68
68
  # we should not delete - these being the most recent ones we want to stick around in case we
69
69
  # need to inspect what was sent.
70
70
  def batch_numbers_to_keep
71
71
  @batch_numbers_to_keep ||= begin
72
- BatchNumber
72
+ Batch
73
73
  .limit(number_of_archived_folders_to_keep)
74
74
  .order(created_at: :desc)
75
75
  .pluck(:id)
@@ -53,11 +53,11 @@ module Renalware
53
53
  Renalware.config.ukrdc_number_of_archived_folders_to_keep.to_i
54
54
  end
55
55
 
56
- # Returns the ids of a few of the most recent BatchNumbers rows (ie the batch number) that
56
+ # Returns the ids of a few of the most recent Batch rows (ie the batch number) that
57
57
  # we should not delete - these being the most recent ones
58
58
  def batch_numbers_to_keep
59
59
  @batch_numbers_to_keep ||= begin
60
- BatchNumber
60
+ Batch
61
61
  .limit(number_of_batches_to_keep)
62
62
  .order(created_at: :desc)
63
63
  .pluck(:id)
@@ -23,7 +23,6 @@ module Renalware
23
23
  FileUtils.mv filepath, paths.archive.join(filepath.basename)
24
24
  next
25
25
  end
26
-
27
26
  logger.info "Processing: #{filepath}"
28
27
  import_surveys_from_file(filepath)
29
28
  end
@@ -49,7 +48,7 @@ module Renalware
49
48
  def import_surveys_from_file(file)
50
49
  # Important to create the log before we do anything that might cause an error
51
50
  # eg parse the xml etc.
52
- TransmissionLog.with_logging(nil, batch_uuid, log_options(file)) do |log|
51
+ TransmissionLog.with_logging(request_uuid: batch_uuid, **log_options(file)) do |log|
53
52
  doc = XmlDocument.new(file)
54
53
  patient = find_patient(doc.nhs_number)
55
54
  log.update!(patient_id: patient.id)
@@ -17,12 +17,13 @@ module Renalware
17
17
  }
18
18
  enum direction: { out: 0, in: 1 }
19
19
  scope :ordered, -> { order(sent_at: :asc) }
20
+ belongs_to :batch
20
21
 
21
- def self.with_logging(patient, request_uuid, **options)
22
+ def self.with_logging(patient: nil, batch: nil, **options)
22
23
  log = new(
23
24
  patient: patient,
24
25
  sent_at: Time.zone.now,
25
- request_uuid: request_uuid,
26
+ batch: batch,
26
27
  **options)
27
28
  yield log if block_given?
28
29
  log.save!
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_dependency "renalware"
4
+
5
+ module Renalware
6
+ class UserSessionPresenter
7
+ # Returns a hash to be splatted into the body attributes in a layout e.g. application.html.slim
8
+ # e.g.
9
+ #
10
+ # body(class="..." *Renalware::UserSessionPresenter.session_controller_data_attributes)
11
+ #
12
+ # renders:
13
+ #
14
+ # <body class="..."
15
+ # data-controller="session"
16
+ # data-session-check-alive-path="/check_session_expired"
17
+ # data-session-debug="true"
18
+ # data-session-keep-alive-path="/keep_session_alive"
19
+ # data-session-login-path="/users/sign_in"
20
+ # data-session-polling-interval="60"
21
+ # data-session-timeout="3600">
22
+ # rubocop:disable Metrics/MethodLength
23
+ def self.session_controller_data_attributes
24
+ return {} if Renalware.config.session_expiry_use_previous_mechansim
25
+
26
+ urls = Renalware::Engine.routes.url_helpers
27
+ {
28
+ data: {
29
+ controller: "session",
30
+ session: {
31
+ "login-path": urls.new_user_session_path,
32
+ "check-alive-path": urls.check_session_expired_path,
33
+ "keep-alive-path": urls.keep_session_alive_path,
34
+ debug: Rails.env.development?.to_s,
35
+ "register-user-activity-after":
36
+ Renalware.config.session_register_user_user_activity_after.to_i,
37
+ timeout: ::Devise.timeout_in
38
+ }
39
+ }
40
+ }
41
+ end
42
+ end
43
+ # rubocop:enable Metrics/MethodLength
44
+ end
@@ -8,7 +8,7 @@
8
8
  / selected yet) otherwise it will display the selected patient who will always be
9
9
  / at option index 1.
10
10
  = f.input :patient_id,
11
- wrapper: :horizontal_medium,
11
+ wrapper: :hz_md,
12
12
  collection: [[consult.patient&.to_s(:long), consult.patient&.id]],
13
13
  selected: 1,
14
14
  input_html: { \
@@ -19,38 +19,39 @@
19
19
 
20
20
  = f.input :consult_site_id,
21
21
  collection: Renalware::Admissions::ConsultSite.all,
22
- wrapper: :horizontal_medium,
22
+ wrapper: :hz_md,
23
23
  include_blank: "Select local site (or enter other site below)",
24
24
  label: "Site"
25
25
 
26
26
  = ward_dropdown_grouped_by_hospital_unit(f,
27
27
  :hospital_ward_id,
28
- include_blank: "Select local ward (or enter other ward below)")
28
+ include_blank: "Select local ward (or enter other ward below)",
29
+ wrapper: :hz_md)
29
30
 
30
- = f.input :other_site_or_ward, wrapper: :horizontal_medium
31
- = f.input :started_on, as: :date_picker, wrapper: :horizontal_datepicker
32
- = f.input :e_alert
31
+ = f.input :other_site_or_ward, wrapper: :hz_md
32
+ = f.input :started_on, as: :date_picker, wrapper: :hz_datepicker
33
+ = f.input :e_alert, wrapper: :hz_md
33
34
  = f.association(:specialty,
34
- wrapper: :horizontal_medium,
35
+ wrapper: :hz_md,
35
36
  collection: Renalware::Admissions::Specialty.ordered)
36
- = f.input :consult_type, wrapper: :horizontal_medium
37
- = f.input :decided_on, as: :date_picker, wrapper: :horizontal_datepicker
38
- = f.input :transfer_priority, include_blank: false, wrapper: :horizontal_small
37
+ = f.input :consult_type, wrapper: :hz_md
38
+ = f.input :decided_on, as: :date_picker, wrapper: :hz_datepicker
39
+ = f.input :transfer_priority, include_blank: false, wrapper: :hz_sm
39
40
  = f.input :priority,
40
41
  include_blank: true,
41
42
  collection: Renalware::Admissions::Consult::PRIORITY_VALUES,
42
- wrapper: :horizontal_tiny
43
- = f.input :transferred_on, as: :date_picker, wrapper: :horizontal_datepicker
43
+ wrapper: :hz_xs
44
+ = f.input :transferred_on, as: :date_picker, wrapper: :hz_datepicker
44
45
  = f.association :seen_by,
45
46
  as: :user_picker,
46
47
  collection: Renalware::User.ordered,
47
- wrapper: :horizontal_medium
48
- = f.input :contact_number, wrapper: :horizontal_medium
48
+ wrapper: :hz_md
49
+ = f.input :contact_number, wrapper: :hz_md
49
50
 
50
- = f.input :aki_risk, include_blank: "Please select", wrapper: :horizontal_small
51
- = f.input :requires_aki_nurse, as: :inline_radio_buttons, wrapper: :horizontal_small
52
- = f.input :rrt, as: :inline_radio_buttons, wrapper: :horizontal_small
53
- = f.input :description, wrapper: :horizontal_large, input_html: { rows: 10 }
51
+ = f.input :aki_risk, include_blank: "Please select", wrapper: :hz_sm
52
+ = f.input :requires_aki_nurse, as: :inline_radio_buttons, wrapper: :hz_sm
53
+ = f.input :rrt, as: :inline_radio_buttons, wrapper: :hz_sm
54
+ = f.input :description, wrapper: :hz_lg, input_html: { rows: 10 }
54
55
 
55
56
  = f.submit class: :button
56
57
  ' or
@@ -44,7 +44,7 @@
44
44
  }
45
45
 
46
46
  .recorded-on
47
- = fpa.input :recorded_on, as: :date_picker, wrapper: :hz_tiny, input_html: { autocomplete: "off" }
47
+ = fpa.input :recorded_on, as: :date_picker, wrapper: :hz_xs, input_html: { autocomplete: "off" }
48
48
 
49
49
  .notes(style="display: block")
50
50
  = fpa.label :notes
@@ -15,7 +15,7 @@ tbody(class=(administration.authorised? ? "authorised" : "unauthorised"))
15
15
  i.fa.fa-check-circle
16
16
  - else
17
17
  = link_to "Sign-off",
18
- edit_hd_prescription_administration_witness_path(administration),
18
+ edit_hd_prescription_administration_witness_path(administration, format: :html),
19
19
  data: { "reveal-id" => "hd-prescription-administration-modal", "reveal-ajax" => "true" }
20
20
  td.col-width-medium-with-ellipsis.show-for-large-up= administration.notes
21
21
  tr
@@ -1,5 +1,5 @@
1
1
  // Render this to re-display the form with errors after an unsuccessful save
2
2
  var modal = $("#hd-prescription-administration-modal")
3
3
  $(modal).html("<%=
4
- j(render 'form', prescription_administration: prescription_administration, url: hd_prescription_administrations_path)
4
+ j(render 'form', prescription_administration: prescription_administration, url: hd_prescription_administrations_path, format: :html)
5
5
  %>");
@@ -3,42 +3,43 @@
3
3
  - content_for(:head) do
4
4
  = wicked_pdf_stylesheet_link_tag "renalware/protocol_pdf"
5
5
 
6
- - protocol.with_format("html") do
7
- .protocol
8
- = render "renalware/patients/header", patient: protocol.patient
9
- table.protocol-patient-summary
10
- thead
11
- tr
12
- th.protocol-hd-profile HD Profile
13
- th.protocol-allergies
14
- | Allergies
15
- - if clinical_patient.allergy_status_updated_at
16
- span.allergy_status_updated_at
17
- = " #{l(clinical_patient.allergy_status_updated_at&.to_date)}"
18
- th.protocol-prescriptions Prescriptions on HD
19
- th.protocol-recent-pathology Recent Pathology
20
- tbody
21
- tr
22
- td
23
- = render "profile", profile: protocol.profile
24
- td
25
- = render "allergies", patient: protocol.patient
26
- = render "virology", protocol: protocol
27
- td
28
- = render "prescriptions", prescriptions: protocol.prescriptions
29
- td
30
- = render "recent_pathology", recent_pathology: protocol.recent_pathology
31
- = render "latest_dry_weight", latest_dry_weight: protocol.latest_dry_weight
6
+ /- protocol.with_format("html") do
7
+ .protocol
8
+ = render "renalware/patients/header", patient: protocol.patient, formats: :html
9
+ table.protocol-patient-summary
10
+ thead
11
+ tr
12
+ th.protocol-hd-profile HD Profile
13
+ th.protocol-allergies
14
+ | Allergies
15
+ - if clinical_patient.allergy_status_updated_at
16
+ span.allergy_status_updated_at
17
+ = " #{l(clinical_patient.allergy_status_updated_at&.to_date)}"
18
+ th.protocol-prescriptions Prescriptions on HD
19
+ th.protocol-recent-pathology Recent Pathology
20
+ tbody
21
+ tr
22
+ td
23
+ = render "profile", profile: protocol.profile, formats: :html
24
+ td
25
+ = render "allergies", patient: protocol.patient, formats: :html
26
+ = render "virology", protocol: protocol, formats: :html
27
+ td
28
+ = render "prescriptions", prescriptions: protocol.prescriptions, formats: :html
29
+ td
30
+ = render "recent_pathology", recent_pathology: protocol.recent_pathology, formats: :html
31
+ = render "latest_dry_weight", latest_dry_weight: protocol.latest_dry_weight, formats: :html
32
32
 
33
- .row.collapse
34
- .small-12.columns
35
- table.auto-layout.protocol-sessions
36
- = render "renalware/hd/sessions/thead"
37
- tbody
38
- - 1..3.times do
39
- = render "renalware/hd/sessions/empty_row"
40
- - protocol.sessions.each_with_index do |session, index|
41
- - stripe_class = index % 2 == 0 ? "even" : "odd"
42
- = render "renalware/hd/sessions/row",
43
- session: session,
44
- stripe_class: stripe_class
33
+ .row.collapse
34
+ .small-12.columns
35
+ table.auto-layout.protocol-sessions
36
+ = render "renalware/hd/sessions/thead", formats: :html
37
+ tbody
38
+ - 1..3.times do
39
+ = render "renalware/hd/sessions/empty_row", formats: :html
40
+ - protocol.sessions.each_with_index do |session, index|
41
+ - stripe_class = index % 2 == 0 ? "even" : "odd"
42
+ = render "renalware/hd/sessions/row",
43
+ session: session,
44
+ stripe_class: stripe_class,
45
+ formats: :html
@@ -17,5 +17,6 @@ td*{ "data-slot-id" => slot.id.present? && slot.id,
17
17
  new_hd_scheduling_diary_slot_path(diary_id: slot.diary_id,
18
18
  station_id: slot.station_id,
19
19
  diurnal_period_code_id: slot.diurnal_period_code_id,
20
- day_of_week: slot.day_of_week),
20
+ day_of_week: slot.day_of_week,
21
+ format: :html),
21
22
  data: { "reveal-id" => "add-patient-to-diary-modal", "reveal-ajax" => "true" }
@@ -32,10 +32,10 @@
32
32
  = f.input :user_id,
33
33
  as: :user_picker,
34
34
  collection: Renalware::User.ordered,
35
- wrapper: :hz_small
35
+ wrapper: :hz_sm
36
36
  = f.input :password,
37
37
  as: :password,
38
- wrapper: :hz_small
38
+ wrapper: :hz_sm
39
39
 
40
40
  .modal__footer
41
41
  .right
@@ -6,5 +6,5 @@
6
6
  td= contact.notes
7
7
  td
8
8
  = link_to("Edit",
9
- edit_patient_letters_contact_path(patient, contact),
9
+ edit_patient_letters_contact_path(patient, contact, format: :html),
10
10
  data: { "reveal-id" => "edit-patient-contact-modal", "reveal-ajax" => "true" })
@@ -4,3 +4,7 @@
4
4
 
5
5
  = within_patient_layout(title: "Letters") do
6
6
  = render "table", letters: letters, patient: patient
7
+
8
+ / If the host app has a views/renalware/letters/_legacy_letters.html.slim partial
9
+ / then render it - provides a way for the host app a change to augment this page.
10
+ = render_if_exists "legacy_letters", patient: patient
@@ -14,7 +14,7 @@
14
14
  |&nbsp;
15
15
 
16
16
  / link to open the modal
17
- = link_to new_patient_medications_home_delivery_event_path(patient),
17
+ = link_to new_patient_medications_home_delivery_event_path(patient, format: :html),
18
18
  class: "button secondary with-icon",
19
19
  data: { "reveal-id" => "print-home-delivery-drugs-modal", "reveal-ajax" => "true" } do
20
20
  i.fa.fa-print
@@ -1,2 +1,6 @@
1
1
  li
2
- = link_to "Log out", destroy_user_session_path, class: "right", method: :delete
2
+ = link_to "Log out",
3
+ destroy_user_session_path,
4
+ class: "right",
5
+ method: :delete,
6
+ data: { action: "click->session#sendLogoutMessageToAnyOpenTabs" }
@@ -10,7 +10,7 @@ article
10
10
  confirm: "Are you sure you want to remove the patient's GP and practice?" }
11
11
 
12
12
  = link_to "Change",
13
- edit_patient_primary_care_physician_path(patient),
13
+ edit_patient_primary_care_physician_path(patient, format: :html),
14
14
  class: "button change-gp",
15
15
  data: { "reveal-id" => "change-gp-modal", "reveal-ajax" => "true" }
16
16
 
@@ -11,7 +11,7 @@
11
11
  .small-10.columns
12
12
  = f.input :ukt_recipient_number,
13
13
  class: "radius",
14
- wrapper: :hz_large,
14
+ wrapper: :hz_lg,
15
15
  label: "UKT recipient number"
16
16
  .small-2.columns
17
17
  = button_tag(type: "submit",
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- PaperTrail.config.track_associations = false
3
+ # PaperTrail.config.track_associations = false
@@ -2,13 +2,6 @@
2
2
 
3
3
  SimpleForm.setup do |config|
4
4
  def configure_label(b)
5
- b.use :html5
6
- b.use :placeholder
7
- b.optional :maxlength
8
- b.optional :pattern
9
- b.optional :min_max
10
- b.optional :readonly
11
-
12
5
  b.wrapper :label_wrapper, tag: :div, class: "wrapper__label" do |ba|
13
6
  ba.use :label
14
7
  end
@@ -24,14 +17,20 @@ SimpleForm.setup do |config|
24
17
 
25
18
  # Configure various sized wrappers. We use CSS to style the label and inputs within the top div
26
19
  # with classes of e.g. "row wrapper-medium"
27
- %i(tiny small medium large).each do |size|
20
+ %i(xs sm md lg).each do |size|
28
21
  config.wrappers(
29
- :"hz_#{size}", # eg hz_medium
22
+ :"hz_#{size}", # eg hz_md
30
23
  tag: "div",
31
24
  class: "row wrapper wrapper_style_horizontal wrapper_size_#{size}",
32
25
  hint_class: :field_with_hint,
33
26
  error_class: :error
34
27
  ) do |b|
28
+ b.use :html5
29
+ b.use :placeholder
30
+ b.optional :maxlength
31
+ b.optional :pattern
32
+ b.optional :min_max
33
+ b.optional :readonly
35
34
  configure_label(b)
36
35
  configure_input(b)
37
36
  end
@@ -44,6 +43,12 @@ SimpleForm.setup do |config|
44
43
  hint_class: :field_with_hint,
45
44
  error_class: :error
46
45
  ) do |b|
46
+ b.use :html5
47
+ b.use :placeholder
48
+ b.optional :maxlength
49
+ b.optional :pattern
50
+ b.optional :min_max
51
+ b.optional :readonly
47
52
  configure_label(b)
48
53
 
49
54
  b.wrapper :right_input_wrapper, tag: :div, class: "wrapper__input" do |ba|