_form.html.slim 4.99 KB
Newer Older
1 2
= simple_error_notice f

3 4 5 6 7 8
- if policy(volunteer).reactivate?
  h3.m-t-30= t('.reactivate.title')
  p== t('.reactivate.hint')
  = link_to t('.reactivate.button'), reactivate_volunteer_path(volunteer), class: 'btn btn-default m-t-10',
      data: { confirm: t('.reactivate.confirm') }
  hr.m-y-30
9
- if current_user && policy(volunteer).update_acceptance?
Chrysanthi Lagodimou's avatar
Chrysanthi Lagodimou committed
10
  .row
11
    .col-xs-12.col-md-4
Emily Wangler's avatar
Emily Wangler committed
12 13
      fieldset
        legend= t('.acceptance.management')
14
        = acceptance_select(@volunteer, f)
Emily Wangler's avatar
Emily Wangler committed
15 16 17 18
        - unless @volunteer.undecided?
          ul.list-unstyled
            - @volunteer.slice(:invited_at, :accepted_at, :undecided_at, :rejected_at, :resigned_at).compact.each do |key, value|
              li #{t_attr(key)} #{l(value)}
19

20
        = f.input :external, input_html: { data: { hide: ['bank-data', 'checklist'] }, class: 'volunteer-active-checkbox-changes' }
Zsolt Benke's avatar
Zsolt Benke committed
21
        = f.association :department, collection: Department.name_asc
22 23

    .col-xs-12.col-md-4
Emily Wangler's avatar
Emily Wangler committed
24 25 26 27 28 29 30 31
      fieldset.checklist
        legend= t('checklist')
        ul.list-inline
          li= f.input :trial_period
          li= f.input :intro_course
          li= f.input :bank_account
          li= f.input :doc_sent
          li= f.input :evaluation
32

Emily Wangler's avatar
Emily Wangler committed
33 34 35 36

    .col-xs-12.col-md-4
      = f.input :rejection_type, collection: Volunteer::REJECTIONS, as: :radio_buttons
      = f.input :rejection_text
37

38
.row
39 40 41 42 43 44 45
  = f.simple_fields_for :contact do |c|
    .col-xs-12.col-md-6
      fieldset
        legend= t_attr(:personal_particulars, Contact)
        = f.input :salutation,
          as: :select,
          collection: Volunteer::SALUTATIONS,
46 47
          include_blank: true, input_html: { tabindex: 1 }
        = render 'contacts/user_fields', f: c, tabindex_start: 1
48
    .col-xs-12.col-md-6
49
      = render 'contacts/address_fields', f: c, tabindex_start: 3
50
    .col-xs-12.col-md-6
Emily Wangler's avatar
Emily Wangler committed
51 52
      .row
        .col-xs-12.col-md-6
53
          = f.input :nationality, as: :country, input_html: { tabindex: 9 }
Emily Wangler's avatar
Emily Wangler committed
54 55 56
          = f.input :birth_year,
            as: :select,
            collection: Volunteer.year_collection,
57
            include_blank: true, input_html: { tabindex: 10 }
58 59 60
        .col-xs-12.col-md-6
          = f.input :additional_nationality, as: :country
          = f.input :avatar, as: :file
Emily Wangler's avatar
Emily Wangler committed
61 62
      .row
        .col-xs-8
63
          = f.input :profession, input_html: { tabindex: 11 }
Emily Wangler's avatar
Emily Wangler committed
64
        .col-xs-4
65
          = f.input :working_percent, input_html: { tabindex: 12 }
Emily Wangler's avatar
Emily Wangler committed
66
        .col-xs-6
67
          = f.input :own_kids, input_html: { tabindex: 13 }
Emily Wangler's avatar
Emily Wangler committed
68
        .col-xs-6
69
          = f.input :education, input_html: { tabindex: 14 }
Emily Wangler's avatar
Emily Wangler committed
70
        .col-xs-12
71
          = f.input :motivation, input_html: { tabindex: 15 }
Emily Wangler's avatar
Emily Wangler committed
72
        .col-xs-12
73
          = checkbox_toggle_collapse(f, :experience, '#experience-desc', tabindex: 16)
Emily Wangler's avatar
Emily Wangler committed
74
        .col-xs-12.collapse#experience-desc
75
          = f.input :volunteer_experience_desc, input_html: { tabindex: 17 }
76
    .col-xs-12.col-md-6
77
      = render 'contacts/phone_fields', f: c, tabindex_start: 6
78 79 80 81 82 83

    .col-xs-12.col-md-6
    - if current_user.present?
      .col-xs-12.col-md-6
        fieldset.bank-data
          legend Bankdaten für Spesen
84 85 86
          = checkbox_toggle_collapse(f, :waive, '.waiver-collapse', check_shows: false, tabindex: 18)
          = f.input :bank, wrapper_html: { class: 'waiver-collapse' }, input_html: { tabindex: 19 }
          = f.input :iban, wrapper_html: { class: 'waiver-collapse' }, input_html: { tabindex: 20 }
Emily Wangler's avatar
Emily Wangler committed
87

88
.row
Emily Wangler's avatar
Emily Wangler committed
89 90 91 92 93 94 95
  .col-xs-12.col-md-6
    h3= t('volunteer_engagement_type_will')
    .row
      .col-xs-12
        p= t('duration_info')
    .row
      .col-xs-12
Markus Koller's avatar
Markus Koller committed
96
        p= link_to t('accompaniment_info'), 'https://www.stadt-zuerich.ch/aoz/de/index/integration/fachstelle-freiwilligenarbeit/einsatzbereiche-fuer-freiwillige-.html', target: '_blank'
Emily Wangler's avatar
Emily Wangler committed
97 98 99 100 101 102 103

    fieldset
      legend= t_attr(:single_accompaniment, Volunteer)
      .row
        - Volunteer::SINGLE_ACCOMPANIMENTS.each do |single_accompaniment|
          .col-xs-12.col-md-3
            = f.input single_accompaniment
104 105
  .col-xs-12.col-md-6
    = render 'language_skills/form', f: f, speaker: @volunteer
106
.row
Emily Wangler's avatar
Emily Wangler committed
107 108 109 110 111
  .col-xs-12.col-md-6
    fieldset
      legend= t_attr(:group_accompaniment, Volunteer)
      .row
        = f.association :group_offer_categories, as: :check_boxes, label: false,
112
          collection: GroupOfferCategory.active.without_house_moving, item_wrapper_class: 'col-xs-4 checkbox-line'
Emily Wangler's avatar
Emily Wangler committed
113 114 115
        = f.association :group_offer_categories, as: :check_boxes, label: false,
          collection: GroupOfferCategory.house_moving, item_wrapper_class: 'col-xs-4'
      = f.input :other_offer_desc
116

117 118 119
  .col-xs-12.col-md-6
    h3= policy(@volunteer).superadmin_privileges? ? t('.availability') : t('.availability_question')
    = render 'availability/form', f: f
Emily Wangler's avatar
Emily Wangler committed
120

121

122
fieldset
Emily Wangler's avatar
Emily Wangler committed
123
  legend= t('generic_keys.other')
124
.row
Emily Wangler's avatar
Emily Wangler committed
125 126 127 128
  .col-xs-12.col-md-6
    = f.input :expectations
    = f.input :strengths
    = f.input :interests
129

130
  - if current_user && policy(volunteer).show_comments?
Emily Wangler's avatar
Emily Wangler committed
131
    .col-xs-12.col-md-6
132 133
      = f.input :comments, input_html: { class: 'double-height' }
      = f.input :additional_comments, input_html: { class: 'double-height' }