Add registration_limit to conference model. Added the input for registration limit in the edit conference form. In the controller, if the limit has exceeded redirect to root_path with an alert. fix #761

This commit is contained in:
David Sedeño 2016-02-02 00:16:43 +01:00
parent 2034c0f965
commit 28fbc518f3
12 changed files with 124 additions and 16 deletions

View file

@ -18,5 +18,6 @@
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.inputs name: "Registrations" do
= f.input :registration_limit, as: :number, in: 0..9999, hint: "Limit the number of registrations to the conference (0 no limit)"
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}