Sha256: 2878b7196e4418d0b73e6c044abecf38a823b47e76ffd1d404e7e65e5e122854

Contents?: true

Size: 1.38 KB

Versions: 40

Compression:

Stored size: 1.38 KB

Contents

= within_admin_layout(title: "New",
  breadcrumbs: breadcrumb_for("Clinic Appointments", appointments_path)) do

  = simple_form_for appointment,
      url: appointments_path,
      method: :post,
      html: { autocomplete: "off" },
      wrapper: "horizontal_form" do |f|

    / Note the shenanigans to get the select2 to redisplay the patient after a validation error
    / or on an edit. Selected: 1 means just select the option at index 1 - option at index 0 is always
    / the blank option. Selecting index 1 fails silently if there is nothing there (no patient
    / selected yet) otherwise it will display the selected patient who will always be
    / at option index 1.
    #patient-select2
      = f.input :patient_id,
                wrapper: :horizontal_medium,
                collection: [[appointment.patient&.to_s(:long), appointment.patient&.id]],
                selected: 1,
                input_html: { \
                  class: "patient-id-select2 patient-ajax-search",
                  data: { "ajax--url" => search_patients_path(format: :json),
                          placeholder: "Search by patient name or hospital/NHS no." } \
              }

    = f.input :clinic_id,
              collection: Renalware::Clinics::Clinic.all,
              wrapper: :horizontal_medium
    = f.input :starts_at, as: :datetime_picker, wrapper: :horizontal_datepicker
    = f.submit class: :button

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
renalware-core-2.0.87 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.86 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.85 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.84 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.83 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.82 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.81 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.80 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.79 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.78 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.77 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.76 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.75 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.74 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.73 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.72 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.71 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.70 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.69 app/views/renalware/clinics/appointments/new.html.slim
renalware-core-2.0.68 app/views/renalware/clinics/appointments/new.html.slim