|
|
@@ -32,9 +32,10 @@ class SettingsController < ApplicationController |
|
|
|
|
|
|
|
def edit |
|
|
|
@notifiables = Redmine::Notifiable.all |
|
|
|
if request.post? && params[:settings] && params[:settings].is_a?(Hash) |
|
|
|
Setting.set_all_from_params(params[:settings]) |
|
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
|
if request.post? |
|
|
|
if Setting.set_all_from_params(params[:settings]) |
|
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
|
end |
|
|
|
redirect_to settings_path(:tab => params[:tab]) |
|
|
|
else |
|
|
|
@options = {} |
|
|
@@ -60,7 +61,7 @@ class SettingsController < ApplicationController |
|
|
|
end |
|
|
|
|
|
|
|
if request.post? |
|
|
|
Setting.send "plugin_#{@plugin.id}=", params[:settings] |
|
|
|
Setting.send "plugin_#{@plugin.id}=", params[:settings].permit!.to_h |
|
|
|
flash[:notice] = l(:notice_successful_update) |
|
|
|
redirect_to plugin_settings_path(@plugin) |
|
|
|
else |