mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Do not require programs languages in controller
We did not set this in ProposalController#create so it was empty if we the event validation failed and we rendered :new. It makes little sense to assign this instance variable anyway, we already have @program.
This commit is contained in:
parent
ee4e88a755
commit
e339133c56
3 changed files with 1 additions and 7 deletions
|
|
@ -57,7 +57,6 @@ module Admin
|
|||
@comment_count = @event.comment_threads.count
|
||||
@user = @event.submitter
|
||||
@url = admin_conference_program_event_path(@conference.short_title, @event)
|
||||
@languages = @program.languages_list
|
||||
end
|
||||
|
||||
def comment
|
||||
|
|
@ -71,7 +70,6 @@ module Admin
|
|||
end
|
||||
|
||||
def update
|
||||
@languages = @program.languages_list
|
||||
if @event.update(event_params)
|
||||
|
||||
if request.xhr?
|
||||
|
|
@ -89,7 +87,6 @@ module Admin
|
|||
|
||||
def create
|
||||
@url = admin_conference_program_events_path(@conference.short_title, @event)
|
||||
@languages = @program.languages_list
|
||||
@event.submitter = current_user
|
||||
|
||||
if @event.save
|
||||
|
|
@ -102,7 +99,6 @@ module Admin
|
|||
|
||||
def new
|
||||
@url = admin_conference_program_events_path(@conference.short_title, @event)
|
||||
@languages = @program.languages_list
|
||||
end
|
||||
|
||||
def accept
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@ class ProposalsController < ApplicationController
|
|||
def new
|
||||
@user = User.new
|
||||
@url = conference_program_proposals_path(@conference.short_title)
|
||||
@languages = @program.languages_list
|
||||
end
|
||||
|
||||
def edit
|
||||
@url = conference_program_proposal_path(@conference.short_title, params[:id])
|
||||
@languages = @program.languages_list
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
- if @program.languages.present?
|
||||
.form-group
|
||||
= f.label :language
|
||||
= f.select :language, @languages, { include_blank: false}, { class: 'select-help-toggle form-control' }
|
||||
= f.select :language, @program.languages_list, { include_blank: false}, { class: 'select-help-toggle form-control' }
|
||||
= render 'shared/select_help_text', f: f, for: :event_type_id, options: @conference.program.event_types do |event_type|
|
||||
= event_type.description
|
||||
- if display_details
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue