remove dynamic_form (and fix plugin setting error messages)
fixes CORE-1037 test plan: - basic regression test of errors in plugin settings and faculty journal Change-Id: I42141b506a6510bf20f584ab08b6148fa1f0b5ab Reviewed-on: https://gerrit.instructure.com/141585 Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: Jeremy Putnam <jeremyp@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
29a912e5eb
commit
7e47ac673f
|
@ -38,7 +38,6 @@ gem 'active_model_serializers', '0.9.0alpha1',
|
|||
gem 'authlogic', '3.6.1'
|
||||
gem 'scrypt', '3.0.5'
|
||||
gem 'active_model-better_errors', '1.6.7', require: 'active_model/better_errors'
|
||||
gem 'dynamic_form', '1.1.4', require: false
|
||||
gem 'switchman', '1.11.5'
|
||||
gem 'open4', '1.3.4', require: false
|
||||
gem 'folio-pagination', '0.0.12', require: 'folio/rails'
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
require 'dynamic_form'
|
||||
require 'securerandom'
|
||||
|
||||
# @API Files
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
require 'dynamic_form'
|
||||
|
||||
class PluginsController < ApplicationController
|
||||
before_action :require_setting_site_admin, :set_site_admin_context, :set_navigation
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
require 'dynamic_form'
|
||||
|
||||
class UserNotesController < ApplicationController
|
||||
def index
|
||||
|
|
|
@ -34,7 +34,23 @@
|
|||
<%= f.label :disabled, :en => "Disable this Plugin" %>
|
||||
</div>
|
||||
<% partial = render :partial => @plugin.settings_partial, :locals => {:settings => (@plugin_setting.settings || {}).merge(params[:settings]&.to_unsafe_h || {})} %>
|
||||
<%= f.error_messages if !@error_messages_handled %>
|
||||
|
||||
<% if @plugin_setting.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= t({
|
||||
one: "1 error prohibited this plugin from being saved:",
|
||||
other: "%{count} errors prohibited this plugin from being saved:" },
|
||||
count: @plugin_setting.errors.count
|
||||
) %></h2>
|
||||
|
||||
<ul>
|
||||
<% @plugin_setting.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="box tabular plugin_settings">
|
||||
<%= partial %>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,23 @@
|
|||
<h1 class="page-header"><%= t 'titles.journal_for', "Faculty Journal for %{user}", :user => @user.name %><span id="proccessing"> </span></h1>
|
||||
<div id="create_entry" style="display: none; margin-bottom: 10px;">
|
||||
<%= form_for(@user_note, :url => user_user_notes_path, :html=>{:id=>'add_entry_form'}) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<% if @user_note.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= t({
|
||||
one: "1 error prohibited this note from being saved:",
|
||||
other: "%{count} errors prohibited this note from being saved:" },
|
||||
count: @user_note.errors.count
|
||||
) %></h2>
|
||||
|
||||
<ul>
|
||||
<% @user_note.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= f.hidden_field :user_id, :value=>@user.id %>
|
||||
<table class="formtable" style="width: 100%;">
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue