Skip to content

Commit

Permalink
Merge pull request #648 from mlibrary/contact_information
Browse files Browse the repository at this point in the history
Make contact information required
  • Loading branch information
billdueber authored May 9, 2017
2 parents 24146cc + 76be5ec commit 0376044
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/forms/curation_concerns/generic_work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class GenericWorkForm < Umrdr::Forms::WorkForm
self.model_class = ::GenericWork
include HydraEditor::Form::Permissions
self.terms += [:resource_type, :date_coverage]
self.required_fields = [ :title, :creator, :methodology, :description, :rights, :subject ]
self.required_fields = [ :title, :creator, :methodology, :description, :rights, :subject, :authoremail ]

def rendered_terms
[ :title, :creator, :authoremail, :methodology, :description, :date_coverage, :rights, :subject, :fundedby, :grantnumber, :keyword, :language, :resource_type, :isReferencedBy, :on_behalf_of, :visibility ]
Expand Down
1 change: 1 addition & 0 deletions app/models/generic_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class GenericWork < ActiveFedora::Base
validates :description, presence: { message: 'Your work must have a description.' }
validates :methodology, presence: { message: 'Your work must have a description of the method for collecting the dataset.' }
validates :rights, presence: { message: 'You must select a license for your work.' }
validates :authoremail, presence: { message: 'You must have author contact information.' }

after_initialize :set_defaults

Expand Down

0 comments on commit 0376044

Please sign in to comment.