Feature #14614
closedView hooks for user preferences
0%
Description
I need two new view hooks for my plugin.
1. app/views/my/account.html.erb lines 39-43
<fieldset class="box tabular">
<legend><%=l(:label_preferences)%></legend>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_my_account_right_bottom, :user => @user, :form => f) %>
</fieldset>
2. app/views/users/_form.html.erb lines 45-49
<fieldset class="box tabular">
<legend><%=l(:label_preferences)%></legend>
<%= render :partial => 'users/preferences' %>
<%= call_hook(:view_users_form_right_bottom, :user => @user, :form => f) %>
</fieldset>
This will allow people to add settings under the "Preferences" section for each of these pages. Currently you can only add setting to or after the Information section. My plugins setting is more of a preference than information.
Updated by Jean-Philippe Lang over 11 years ago
I think we could use the same hook in both views. Do you really need 2 different ones?
Updated by Jean-Philippe Lang over 11 years ago
- Priority changed from High to Normal
Well, the existing hooks are actually different (view_users_form, view_my_account). Lets do the same.
Updated by Jean-Philippe Lang over 11 years ago
- Subject changed from Two new view hooks needed to View hooks for user preferences
- Category changed from Accounts / authentication to Plugin API
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.4.0
- Resolution set to Fixed
Hooks added. They were renamed: :view_my_account_preferences
and :view_users_form_preferences
.