ruby: back_path = patient_letters_letters_path(patient) letter = f.object event = letter.event .row.top .medium-6.columns = f.button :submit span= " or " = link_to "cancel", back_path .form-content = render event if event.present? article header h2 Header = f.association :letterhead = f.input :description, input_html: { \ data: { \ autocomplete_source: search_letters_descriptions_path, autocomplete_rel: "[name='letters[description]']" \ }, placeholder: "Start entering the description (min. 2 characters)", spellcheck: false, class: "clear-autocomplete" \ } = hidden_field_tag "description_id" = f.input :clinical, as: :hidden = f.input :issued_on, as: :date_picker = f.association :author, as: :user_picker, collection: Renalware::System::UsersPresenter.new.list_for_dropdown( \ user_to_promote_to_top: current_user \ ) = render "pathology", letter: letter, f: f = render "main_recipient", f: f, contacts: contacts, patient: patient = render "additional_ccs", f: f, contacts: contacts, patient: patient = render "electronic_ccs", f: f, contacts: contacts, patient: patient, electronic_recipient_options: electronic_recipient_options article header h2 Message = f.input :salutation = f.label :body = snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet: ".letter-body-editor") - if event&.respond_to?(:notes) = link_to "Insert #{event.class.name.demodulize.underscore.humanize.downcase} notes", "/", data: { notes: event.notes || "", target: ".letter-body-editor" }, class: "insert-data-notes button alternative right editor-toolbar-button" = f.trix_editor :body, class: "letter-body-editor" article header h2 Admin = f.input :notes, as: :text, input_html: { rows: 4 } = f.input :enclosures .row.bottom .large-12.columns = f.button :submit span= " or " = link_to "cancel", back_path