ref: master
app/views/profile_editor/_person_form.html.erb
<% @person ||= @profile %> <% editing_profile ||= false %> <%= optional_field(@person, 'nickname') do %> <%= f.text_field(:nickname, :maxlength => 16, :size => 30, :rel => _('Nickname')) %><%= _('A short name by which you like to be known. Will be used in friends listings, community member listings etc.') %><% end %> <%= optional_field(@person, 'description', f.text_area(:description, :rows => 5, :rel => _('Description'))) %> <%= optional_field(@person, 'preferred_domain', select_preferred_domain(:profile_data)) %> <%= optional_field(@person, 'contact_information', f.text_field(:contact_information, :rel => _('Contact information'))) %> <%= optional_field(@person, 'contact_phone', labelled_form_field(_('Home phone'), text_field(:profile_data, :contact_phone, :rel => _('Contact phone')))) %> <%= optional_field(@person, 'cell_phone', f.text_field(:cell_phone, :rel => _('Cell phone'))) %> <%= optional_field(@person, 'comercial_phone', f.text_field(:comercial_phone, :rel => _('Comercial phone'))) %> <%= optional_field(@person, 'jabber_id', f.text_field(:jabber_id, :rel => _('Jabber'))) %> <%= optional_field(@person, 'personal_website', f.text_field(:personal_website, :rel => _('Personal website'))) %> <%= optional_field(@person, 'sex', f.radio_group(:profile_data, :sex, [ ['male',_('Male')], ['female',_('Female')] ])) %> <%= optional_field(@person, 'birth_date', labelled_form_field(_('Birth date'), date_field('profile_data[birth_date]', @person.birth_date, {:change_month => true, :change_year => true, :year_range => '-100:-5', :date_format => 'yy-mm-dd'}, {:id => 'profile_data_birth_date'}))) %> <%= optional_field(@person, 'nationality', f.text_field(:nationality, :rel => _('Nationality'))) %> <%= optional_field(@person, 'image', labelled_form_field(_('Image'), file_field(:file, :image, :rel => _('Image')))) %> <%= render partial: 'shared/location_form', locals: { f: f, profile: @person } unless editing_profile %> <% @plugins.dispatch(:extra_optional_fields).each do |field| %> <%= optional_field(@person, field[:name], labelled_form_field(field[:label], text_field(field[:object_name], field[:method], :rel => field[:label], :value => field[:value]))) %> <% end %> <%= optional_field(@person, 'schooling') do %><% end %> <%= javascript_include_tag('city_state_validation') %> <%= optional_field(@person, 'formation', select_area(_('Education'), 'profile_data', 'formation', {:class => 'type-select-full-line'})) %> > <%= optional_field(@person, 'custom_formation', f.text_field(:custom_formation, :rel => _('Custom formation'))) %> <%= observe_field 'profile_data_formation', :function =>'toggle_text_field("profile_data_formation", "profile_data_custom_formation_span")' %> <%= optional_field(@person, 'area_of_study', select_area(_('Area of study'), 'profile_data', 'area_of_study', {:class => 'type-select-full-line'})) %> > <%= optional_field(@person, 'custom_area_of_study', f.text_field(:custom_area_of_study, :rel => _('Custom area of study'))) %> <%= observe_field 'profile_data_area_of_study', :function =>'toggle_text_field("profile_data_area_of_study", "profile_data_custom_area_of_study_span")' %> <%= optional_field(@person, 'professional_activity', f.text_field(:professional_activity, :rel => _('Professional activity'))) %> <%= optional_field(@person, 'organization', f.text_field(:organization, :rel => _('Organization'))) %> <%= optional_field(@person, 'organization_website', f.text_field(:organization_website, :rel => _('Organization website'))) %><%= select_schooling('profile_data', 'schooling', {:class => 'select-schooling'}) %> <%= select_schooling_status('profile_data', 'schooling_status', {:class => 'select-schooling'}) %>