Sha256: 400069aedc0026a1d77653c7c36749506a30e2b81bff799d7aa8e56907798e4c

Contents?: true

Size: 988 Bytes

Versions: 3

Compression:

Stored size: 988 Bytes

Contents

= form_for new_report, url: create_report_path do |f|
  - if new_report.errors.any?
    .error
      %h2= format(n_('An error prevented your report from being saved:',
                      '%<nb>i errors prevented your report from being saved:',
                      new_report.errors.count), nb: new_report.errors.count)
      %ul
        - new_report.errors.full_messages.each do |message|
          %li= message

  - if user_signed_in?
    %p= format(_('Report will be posted as "%<name>s"'), name: current_user.username)
    %p= _('By submitting this report, you agree to be recontacted by administrators.')
  - else
    .field
      = f.label :name
      .field-input= f.text_field :name
    .field
      = f.label :email
      .field-input= f.text_field :email
    .field
      = f.label :allow_contact
      .field-input= f.check_box :allow_contact
  .field
    = f.label :reason
    .field-input= f.text_area :reason

  .actions
    = f.submit _('Save'), class: 'btn btn--save'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
elabs-3.0.0 app/views/elabs/reports/_form.html.haml
elabs-2.0.0 app/views/elabs/reports/_form.html.haml
elabs-2.0.0.pre app/views/elabs/reports/_form.html.haml