# HG changeset patch # User luisf # Date 1380381713 -3600 # Node ID bf2db886a543b13f5a741417d4013701cfe43084 # Parent 5b65c47087b93a2e0ead98da6badc69d85f39067 keeps the state of the hidden fields when validation fails. diff -r 5b65c47087b9 -r bf2db886a543 plugins/redmine_bibliography/app/models/authorship.rb --- a/plugins/redmine_bibliography/app/models/authorship.rb Sat Sep 28 16:05:15 2013 +0100 +++ b/plugins/redmine_bibliography/app/models/authorship.rb Sat Sep 28 16:21:53 2013 +0100 @@ -44,12 +44,12 @@ # using default setter (attr_writer) if self.author.nil? - @search_author_class = "" + aclass = "" else - @search_author_class = "Author" + aclass = "Author" end - @search_author_class + @search_author_class || aclass end # def search_author_class=(search_author_class) @@ -58,19 +58,22 @@ def search_author_id if self.author.nil? - "xxx" + authid = "xxx" else - author_id + authid = author_id end + + @search_author_id || authid end def search_author_tie if self.author.nil? - return false + auth_tie = false else - return true + auth_tie = true end + @search_author_tie || auth_tie end def name