diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 22b5dc7..24ca7e7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -691,8 +691,12 @@ module ApplicationHelper form_for(name, object, { :builder => NoosferoFormBuilder }.merge(options), &proc) end - def custom_field(profile, name, field_html, options = {}) + def custom_field(profile, name, field_html = nil, options = {}, &block) result = "" + if block + field_html ||= '' + field_html += capture(&block) + end if (controller.action_name == 'signup') if profile.signup_fields.include?(name) result = field_html @@ -705,6 +709,11 @@ module ApplicationHelper if profile.required_fields.include?(name) result = required(result) end + + if block + concat(result, block.binding) + end + result end diff --git a/app/views/account/_signup_form.rhtml b/app/views/account/_signup_form.rhtml index 4d7215e..408ddfd 100644 --- a/app/views/account/_signup_form.rhtml +++ b/app/views/account/_signup_form.rhtml @@ -21,7 +21,7 @@ in this environment.') % environment.name %> <%= help %> <%= required f.text_field(:email, - :help => help=_('We\'ll send you an e-mail to validate your registration.')) %> + :help => help=_('This e-mail address will be used to contact you about events that deserve your attention.')) %> <%= help %> <%= required f.password_field(:password, diff --git a/app/views/profile_editor/_person_form.rhtml b/app/views/profile_editor/_person_form.rhtml index 8d1da03..f90d88c 100644 --- a/app/views/profile_editor/_person_form.rhtml +++ b/app/views/profile_editor/_person_form.rhtml @@ -1,14 +1,10 @@ <% @person ||= @profile %> -<%= custom_field(@person, 'nickname', f.text_field(:nickname, :maxlength => 16, :size => 30)) %> - -<% nickname_tip = "