app/views/peoplefinder/people/_form.html.haml in peoplefinder-0.0.2 vs app/views/peoplefinder/people/_form.html.haml in peoplefinder-0.1.0

- old
+ new

@@ -4,19 +4,24 @@ = 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 @@ -30,32 +35,45 @@ = f.input :no_phone, as: :boolean, label: 'No phone number' .form-group = f.input :email, as: :string, label: 'Email address' .form-group - %h3.line-above + %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 - %h3 Working days + %h2.h3.no-line Working days .form-checkbox - - Peoplefinder::Person::DAYS_WORKED.each do |day| - = f.input day, as: :boolean, label: day_name(day) + %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 - %h3.line-above Photograph + %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 - = image_tag @person.image.medium, class: 'preview' + = 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', @person.new_record? ? :back : @person + = link_to 'Cancel and go to profile page', @person.new_record? ? :back : @person