Sha256: 7f8763f1236df78010f3f6505e59b75e4365583af745fc2de4a6277a5efd390c

Contents?: true

Size: 1.09 KB

Versions: 17

Compression:

Stored size: 1.09 KB

Contents

// Insert inputs (if any) specific to the EventType the user has selected.
// For example if the user selects a 'Renal Biopsy' event type in the 'new event' form
// then we should insert some extra fields to capture biopsy-specific data.
// We do this by rendering the event's partial the name of which is specified by the event class
// in #to_partial_path.
// Note in order to get form error validations to wire up nicely, we need a SimpleFormBuilder
// or more correctly we need to be inside a simple_form_for block. Note the quotes around the
// simple_form_for code here ensure the content is not rendered, but the erb tags
// still means the ruby is interpreted and the block and its argument f are available!
'<%= simple_form_for(event, url: new_patient_event_path(patient), as: :events_event, wrapper: "horizontal_form") do |f| %>'
  <%=
    partial_name = "renalware/events/events/inputs/#{event.to_partial_path}"
    refresh("#event-type-specific-inputs",
              partial: partial_name,
              locals: { f: f, event: event })
  %>
'<% end %>'
initDatepickersIn("#event-type-specific-inputs");

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc9 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc8 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc7 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc6 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc5 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc4 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc3 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.rc1 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta12 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta11 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta10 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta9 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta8 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta7 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta6 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta5 app/views/renalware/events/events/new.js.erb
renalware-core-2.0.0.pre.beta4 app/views/renalware/events/events/new.js.erb