= editing_mode = simple_form_for @person, :html => {:multipart => true} do |f| = f.error_notification .form-group = f.input :given_name, as: :string, label: 'First name' .form-group = f.input :surname, as: :string, required: false - if feature_enabled?("communities") .form-group %label.form-label-bold{ for: :person_community_id } Community = f.select(:community_id, Peoplefinder::Community.all.map { |c| [c.name, c.id] }, { include_blank: true} ) .form-group #memberships %h2.line-above Roles = f.fields_for :memberships do |membership_f| = render partial: 'membership_fields', locals: { membership_f: membership_f } = link_to 'Add new role', add_membership_people_path(id: @person.to_param), id: 'add_membership' .form-group %h2.line-above Contact details %label.form-label-bold{ for: :person_location } Location of work %p.form-hint= info_text('location_hint') = f.input :location, as: :string, label: false .phone_numbers{ style: ('display:none' if @person.no_phone)} .form-group = f.input :primary_phone_number, as: :string .form-group = f.input :secondary_phone_number, as: :string, label: 'Any other phone number' .form-checkbox = f.input :no_phone, as: :boolean, label: 'No phone number' .form-group = f.input :email, as: :string, label: 'Email address' .form-group %h2.h3.line-above %label{ for: :person_description } Notes %p.form-hint= info_text('notes_field_hint') = f.input :description, label: false, input_html: { class: 'wider' } .form-group %h2.h3.no-line Working days .form-checkbox %fieldset %legend - Peoplefinder::Person::DAYS_WORKED.each do |day| = f.input day, as: :boolean, label: day_name(day) - if feature_enabled?(:profile_tags) .form-group %h2.h3.line-above Skills and expertise %p.form-hint= info_text('skills_and_expertise_hint') #person_tag_chooser = hidden_field_tag :tag_list, Peoplefinder::Person.tag_list = f.input :tags, as: :string, label: false .form-group %h2.h3.line-above Photograph %p.form-hint= info_text('photo_upload_hint') %p.form-hint= info_text('photo_size_hint') %label.visuallyhidden{ for: :person_image } Choose file = f.input :image, as: :file, label: false = profile_image_tag @person, @person.image.medium, class: 'preview' %p - if @person.image? = link_to 'Crop image', edit_person_image_path(@person) .form-group = f.button :submit .cancel = link_to 'Cancel and go to profile page', @person.new_record? ? :back : @person