Index: app/views/users/_contact_preferences.html.erb =================================================================== --- app/views/users/_contact_preferences.html.erb (revision 0) +++ app/views/users/_contact_preferences.html.erb (working copy) @@ -0,0 +1,5 @@ +

+ <%= label_tag('pref[contact_form]', l(:field_contact_form)) %> + <%= hidden_field_tag('pref[contact_form]', 0, :id => nil) %> + <%= check_box_tag('pref[contact_form]', 1, user.pref.contact_form) %> +

Index: lib/contact_hook.rb =================================================================== --- lib/contact_hook.rb (revision 60) +++ lib/contact_hook.rb (working copy) @@ -2,8 +2,13 @@ render_on :view_account_left_bottom, :partial => 'users/show' - render_on :view_users_form, :partial => 'users/contact' - render_on :view_my_account, :partial => 'users/contact' + if Redmine::VERSION::MAJOR >= 3 || (Redmine::VERSION::MAJOR >= 2 && Redmine::VERSION::MINOR >= 4) + render_on :view_users_form_preferences, :partial => 'users/contact_preferences' + render_on :view_my_account_preferences, :partial => 'users/contact_preferences' + else + render_on :view_users_form, :partial => 'users/contact' + render_on :view_my_account, :partial => 'users/contact' + end if defined?(ChiliProject) && ChiliProject::VERSION::MAJOR >= 3 render_on :view_layouts_base_body_bottom, :partial => 'contact_form/chiliproject'