mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
merged from upstream
This commit is contained in:
commit
9eb47bd3f0
19 changed files with 82 additions and 58 deletions
|
|
@ -179,12 +179,12 @@ module Admin
|
|||
def update_state(transition, notice, mail = false, subject = false, send_mail = false)
|
||||
alert = @event.update_state(transition, mail, subject, send_mail, params[:send_mail].blank?)
|
||||
|
||||
if !alert.blank?
|
||||
flash[:error] = error
|
||||
return redirect_back_or_to(admin_conference_events_path(conference_id: @conference.short_title)) && return
|
||||
else
|
||||
if alert.blank?
|
||||
flash[:notice] = notice
|
||||
redirect_back_or_to(admin_conference_events_path(conference_id: @conference.short_title)) && return
|
||||
else
|
||||
flash[:error] = alert
|
||||
return redirect_back_or_to(admin_conference_events_path(conference_id: @conference.short_title)) && return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ module Admin
|
|||
@registration.update_attributes(registration_params)
|
||||
if @registration.save
|
||||
redirect_to admin_conference_registrations_path(@conference.short_title),
|
||||
notice: 'Successfully updated registration!'
|
||||
notice: "Successfully updated registration for #{@registration.user.email}!"
|
||||
else
|
||||
flash[:error] = "An error prohibited the Registration for #{@conference.title}: "\
|
||||
flash[:error] = "An error prohibited the Registration for #{@registration.user.email}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
|
|
@ -56,7 +56,7 @@ module Admin
|
|||
permit(
|
||||
:conference_id, :arrival, :departure,
|
||||
:volunteer,
|
||||
vchoice_ids: [], qanswer_ids: [],
|
||||
vchoice_ids: [], qanswer_ids: [], event_ids: [],
|
||||
qanswers_attributes: [],
|
||||
user_attributes: [
|
||||
:id, :name, :tshirt, :mobile, :volunteer_experience, :languages,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue