Add a switch for allowing registration on events (proposals)
This commit is contained in:
parent
75bf1380ba
commit
03f7951676
10 changed files with 30 additions and 9 deletions
|
|
@ -57,7 +57,11 @@ module Admin
|
|||
private
|
||||
|
||||
def cfp_params
|
||||
params.require(:cfp).permit(:start_date, :end_date, :description, :cfp_type)
|
||||
params.require(:cfp).permit(
|
||||
:start_date, :end_date,
|
||||
:description, :cfp_type,
|
||||
:enable_registrations
|
||||
)
|
||||
end
|
||||
|
||||
def cfp_params_or_first_remaining_type
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@
|
|||
readonly: 'readonly' }
|
||||
= f.input :description, hint: markdown_hint,
|
||||
input_html: { rows: 2, data: { provide: 'markdown-editable' } }
|
||||
- if cfp.cfp_type == 'events'
|
||||
= f.input :enable_registrations, as: :boolean,
|
||||
hint: 'Allow submitters to request registration?'
|
||||
- else
|
||||
= f.input :enable_registrations, as: :hidden
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button,
|
||||
button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -43,10 +43,11 @@
|
|||
250
|
||||
words.
|
||||
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
|
||||
= f.input :max_attendees, hint: 'The maximum number of participants. ' + message
|
||||
- if @program.cfp.enable_registrations?
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
|
||||
= f.input :max_attendees, hint: 'The maximum number of participants. ' + message
|
||||
|
||||
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
||||
= f.input :is_highlight
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@
|
|||
250
|
||||
words.
|
||||
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
- if @program.cfp.enable_registrations?
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
|
||||
%p.text-right
|
||||
= link_to '#description', 'data-toggle' => 'collapse', id: 'description_link' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue