diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index 48d62c817..23087362d 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -216,6 +216,6 @@ def event_params end def user_params - params.require(:user).permit(:email, :password, :password_confirmation, :username) + params.require(:user).permit(:email, :password, :password_confirmation, :username, :is_admin) end end diff --git a/app/views/proposals/_submission_type_content_form.haml b/app/views/proposals/_submission_type_content_form.haml index 76b915047..c7b947e25 100644 --- a/app/views/proposals/_submission_type_content_form.haml +++ b/app/views/proposals/_submission_type_content_form.haml @@ -3,8 +3,10 @@ .form-group = f.label :event_type_id, "Type" - - visible_event_types = current_user&.is_admin ? @conference.program.event_types : @conference.program.event_types.available_for_public - = f.select :event_type_id, event_type_select_options(visible_event_types), { include_blank: false }, { class: 'select-help-toggle form-control' } + - if current_user&.is_admin + = f.select :event_type_id, event_type_select_options(@conference.program.event_types), { include_blank: false }, { class: 'select-help-toggle form-control' } + - else + = f.select :event_type_id, event_type_select_options(@conference.program.event_types.available_for_public), { include_blank: false }, { class: 'select-help-toggle form-control' } - program.event_types.each do |event_type| .help-block.event_event_type_id.collapse{ id: "#{dom_id(event_type)}-help" }