From a4aab71d226b46e6b2770cdf508cf8fb32364422 Mon Sep 17 00:00:00 2001 From: JoenioCosta Date: Sat, 21 Jun 2008 03:19:28 +0000 Subject: [PATCH] ActionItem427: add way do environment admin edit message for disabled enterprises --- app/models/environment.rb | 2 +- app/views/admin_panel/index.rhtml | 1 + app/views/admin_panel/message_for_disabled_enterprise.rhtml | 14 ++++++++++++++ test/functional/admin_panel_controller_test.rb | 29 ++++++++++++++++++++++++++--- 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 app/views/admin_panel/message_for_disabled_enterprise.rhtml diff --git a/app/models/environment.rb b/app/models/environment.rb index aa7973f..ae0c048 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -193,7 +193,7 @@ class Environment < ActiveRecord::Base validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |record| ! record.contact_email.blank? }) - xss_terminate :only => [ :description ], :with => 'white_list' + xss_terminate :only => [ :description, :message_for_disabled_enterprise ], :with => 'white_list' # ################################################# # Business logic in general diff --git a/app/views/admin_panel/index.rhtml b/app/views/admin_panel/index.rhtml index f5ccc30..974ad9b 100644 --- a/app/views/admin_panel/index.rhtml +++ b/app/views/admin_panel/index.rhtml @@ -4,6 +4,7 @@