diff --git a/app/models/bulk_update_request.rb b/app/models/bulk_update_request.rb index 7d7d3b02f..f510c56f2 100644 --- a/app/models/bulk_update_request.rb +++ b/app/models/bulk_update_request.rb @@ -5,6 +5,8 @@ class BulkUpdateRequest < ActiveRecord::Base belongs_to :forum_topic validates_presence_of :user + validates_presence_of :script + validates_presence_of :title validates_inclusion_of :status, :in => %w(pending approved rejected) attr_accessible :user_id, :forum_topic_id, :script, :title, :reason attr_accessible :status, :as => [:admin] diff --git a/app/views/bulk_update_requests/new.html.erb b/app/views/bulk_update_requests/new.html.erb index a78a69263..c6731bd64 100644 --- a/app/views/bulk_update_requests/new.html.erb +++ b/app/views/bulk_update_requests/new.html.erb @@ -16,7 +16,7 @@ create alias aaa -> bbb create implication aaa -> bbb mass update aaa -> bbb - <%= text_area :bulk_update_request, :script, :size => "50x10" %> + <%= text_area :bulk_update_request, :script, :size => "50x10", :required => true %>