Sha256: 8e89de420cfcd86c3ea72717658430f4a8a452ba633f7587432a691b591130b7

Contents?: true

Size: 1.35 KB

Versions: 75

Compression:

Stored size: 1.35 KB

Contents

= simple_form_for [patient, training_session],
                  as: :training_session,
                  html: { autocomplete: "off" },
                  wrapper: "horizontal_form" do |f|

  / This hidden input exists only so that posted form params have 'training_session' at the top
  / eg params[:training_session][:document], otherwise we just get params[:document] and that would
  / confound our .permit/.require expectations in the controller.
  = f.input :ignore_me, as: :hidden
  = f.association :training_site,
      collection: Renalware::PD::TrainingSite.ordered,
      wrapper: :horizontal_small,
      autofocus: true

  = f.association :training_type,
      collection: Renalware::PD::TrainingType.ordered,
      wrapper: :horizontal_medium

  = f.simple_fields_for :document, training_session.document do |fdoc|
    = fdoc.input :started_on, as: :date_picker, wrapper: :horizontal_datepicker
    = fdoc.input :trainer, wrapper: :horizontal_medium
    = fdoc.input :training_duration,
            collection: Renalware::PD::TrainingDurationPresenter.dropdown_options,
            wrapper: :horizontal_small
    = fdoc.input :outcome, as: :inline_radio_buttons, wrapper: :horizontal_medium
    = fdoc.input :training_comments, as: :text, input_html: { rows: 5 }

  = f.submit "Save", class: "button"
  span= " or "
  = link_to "cancel", patient_pd_dashboard_path(patient)

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
renalware-core-2.0.147 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.146 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.145 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.144 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.143 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.142 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.141 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.140 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.139 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.138 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.137 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.136 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.135 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.134 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.133 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.132 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.131 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.130 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.129 app/views/renalware/pd/training_sessions/_form.html.slim
renalware-core-2.0.128 app/views/renalware/pd/training_sessions/_form.html.slim