Configuration management
The partial view we defined when initializing our plugin's settings
field will be rendered when an administrator clicks on the Configure link for our plugin:
The partial that we'll create will be made up of a number of groups. Each group represents a settings key that we want to update a value for.
The fields that we'll define will be a subset of a predefined form, which is rendered if our plugin has defined a partial to be used for configuration. This partial is injected into the form at /path/to/redmine/app/views/settings/plugin.html.erb
.
As the form tag has already been defined, all we have to provide are input tags that capture our settings, values. For this to work properly, we name the input fields settings[our_setting_name]
.
<p> <%= label_tag :settings_sort_category_tree, l(:allow_sort_category_tree) %> <%= check_box_tag 'settings[sort_category_tree]', 1, @settings[:sort_category_tree] %> </p> <p> <%= label_tag :settings_show_category_totals...