diaspora/app/views/people/edit.html.haml
Josh Lubaway ecd1d2ecd6 Bug #624 Can't unset birthday
This change allows users to "unset" their birthday.

Previously the logic checked to see if all values for birthday were
present (year, month, day). If all values were present the update
would proceed.

Now, there is another condition. If all values are empty, then
also proceed with the update. Thus, allowing a user to "unset" their
birthday.
2010-11-30 21:23:47 -08:00

57 lines
1.8 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
#section_header
%h2
= t('settings')
%ul#settings_nav
%li=link_to t('profile'), edit_person_path(current_user.person)
%li=link_to t('account'), edit_user_path(current_user)
%li=link_to t('_services'), services_path
.span-19.prepend-5.last
= form_for @person, :html => { :multipart => true } do |person|
%h3
= t('.your_profile')
.description
=t('.info_available_to')
= person.error_messages
= person.fields_for :profile do |profile|
%h4
= t('.your_name')
= profile.text_field :first_name, :value => @profile.first_name, :placeholder => t('.first_name')
= profile.text_field :last_name, :value => @profile.last_name, :placeholder => t('.last_name')
%h4
= t('.your_gender')
%br
= profile.text_field :gender, :value => @profile.gender, :placeholder => t('fill_me_out')
%h4
= t('.your_birthday')
%br
= select_date @person.profile.birthday, :prompt => true, :prefix => 'person[profile][date]',
:default => true, :order => t('date.order'), :start_year => 2000, :end_year => 1904
%h4
= t('.your_bio')
= profile.text_area :bio, :value => @profile.bio, :rows => 5, :placeholder => t('fill_me_out')
%h4
= t('.your_photo')
= render 'people/profile_photo_upload', :form => profile
%h4
= t('search')
%p{:class=>"checkbox_select"}
= profile.label :searchable, t('.allow_search')
= profile.check_box :searchable, {:checked => @person.profile.searchable}, true, false
.submit_block
= link_to t('cancel'), edit_user_path(current_user)
= t('or')
= person.submit t('.update_profile')