diff --git a/BrainPortal/app/controllers/signups_controller.rb b/BrainPortal/app/controllers/signups_controller.rb index a2454bb0a..04ad9524b 100644 --- a/BrainPortal/app/controllers/signups_controller.rb +++ b/BrainPortal/app/controllers/signups_controller.rb @@ -63,7 +63,9 @@ def create #:nodoc: return end + # Validation failed, return to form if ! @signup.save + @auth_spec = form_generated_at_int # keep old form_generated time render :action => :new return end diff --git a/BrainPortal/app/views/signups/new.html.erb b/BrainPortal/app/views/signups/new.html.erb index aa6d92445..1351d0e4a 100644 --- a/BrainPortal/app/views/signups/new.html.erb +++ b/BrainPortal/app/views/signups/new.html.erb @@ -26,7 +26,7 @@ <%= form_for @signup, :url => {:action => (@signup.new_record? ? "create" : "update"), :id => @signup.id} do |f| %> <%= error_messages_for @signup %> - <%= hidden_field_tag :auth_spec, Time.now.to_i.to_s %> + <%= hidden_field_tag(:auth_spec, (@auth_spec.to_s || Time.now.to_i.to_s)) %>
Fields with an asterisk (*) are mandatory.