mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
flash alert to flash error
This commit is contained in:
parent
65c0cd7a73
commit
d44e1f7c24
9 changed files with 23 additions and 23 deletions
|
|
@ -18,7 +18,7 @@ module Admin
|
|||
redirect_to admin_conference_call_for_paper_path,
|
||||
notice: 'Call for papers successfully created.'
|
||||
else
|
||||
flash[:alert] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -37,7 +37,7 @@ module Admin
|
|||
redirect_to(admin_conference_call_for_paper_path(@conference.short_title),
|
||||
notice: 'Call for papers successfully updated.')
|
||||
else
|
||||
flash[:alert] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}."
|
||||
flash[:error] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -46,7 +46,7 @@ module Admin
|
|||
if @call_for_paper.destroy
|
||||
redirect_to admin_conference_call_for_paper_path, notice: 'Call for Papers was successfully deleted.'
|
||||
else
|
||||
redirect_to admin_conference_call_for_paper_path, alert: 'An error prohibited this Call for Papers from being destroyed: '\
|
||||
redirect_to admin_conference_call_for_paper_path, error: 'An error prohibited this Call for Papers from being destroyed: '\
|
||||
"#{@call_for_paper.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ module Admin
|
|||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully created.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -32,7 +32,7 @@ module Admin
|
|||
redirect_to admin_conference_commercials_path,
|
||||
notice: 'Commercial was successfully updated.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module Admin
|
|||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -36,7 +36,7 @@ module Admin
|
|||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
else
|
||||
flash[:alert] = 'An error prohibited the Registration Period from being saved: ' \
|
||||
flash[:error] = 'An error prohibited the Registration Period from being saved: ' \
|
||||
"#{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ module Admin
|
|||
redirect_to admin_conference_registrations_path(@conference.short_title),
|
||||
notice: 'Successfully updated registration!'
|
||||
else
|
||||
flash[:alert] = "An error prohibited the Registration for #{@conference.title}: "\
|
||||
flash[:error] = "An error prohibited the Registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
|
|
@ -32,7 +32,7 @@ module Admin
|
|||
notice: "Deleted registration for #{@user.name}!"
|
||||
else
|
||||
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||
alert: 'You must be an admin to delete a registration.')
|
||||
error: 'You must be an admin to delete a registration.')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ module Admin
|
|||
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
|
||||
notice: 'Target successfully created.')
|
||||
else
|
||||
flash[:alert] = "Creating target failed: #{@target.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Creating target failed: #{@target.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -29,7 +29,7 @@ module Admin
|
|||
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
|
||||
notice: 'Target successfully updated.')
|
||||
else
|
||||
flash[:alert] = "Target update failed: #{@target.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Target update failed: #{@target.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
@ -40,7 +40,7 @@ module Admin
|
|||
notice: 'Target successfully destroyed.')
|
||||
else
|
||||
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
|
||||
alert: 'Target was successfully destroyed.' \
|
||||
error: 'Target was successfully destroyed.' \
|
||||
"#{@target.errors.full_messages.join('. ')}.")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ module Admin
|
|||
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
|
||||
notice: 'Ticket successfully created.')
|
||||
else
|
||||
flash[:alert] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -29,7 +29,7 @@ module Admin
|
|||
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
|
||||
notice: 'Ticket successfully updated.')
|
||||
else
|
||||
flash[:alert] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
@ -40,7 +40,7 @@ module Admin
|
|||
notice: 'Ticket successfully destroyed.')
|
||||
else
|
||||
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
|
||||
alert: 'Ticket was successfully destroyed.' \
|
||||
error: 'Ticket was successfully destroyed.' \
|
||||
"#{@ticket.errors.full_messages.join('. ')}.")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ module Admin
|
|||
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully created.')
|
||||
else
|
||||
flash[:alert] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -34,7 +34,7 @@ module Admin
|
|||
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully updated.')
|
||||
else
|
||||
flash[:alert] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
@ -45,7 +45,7 @@ module Admin
|
|||
notice: 'Track successfully deleted.')
|
||||
else
|
||||
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
|
||||
alert: 'Track couldn\'t be deleted.' \
|
||||
error: 'Track couldn\'t be deleted.' \
|
||||
"#{@track.errors.full_messages.join('. ')}.")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class CommercialsController < ApplicationController
|
|||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
notice: 'Commercial was successfully created.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -28,7 +28,7 @@ class CommercialsController < ApplicationController
|
|||
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
|
||||
notice: 'Commercial was successfully updated.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
notice: 'You are now registered and will be receiving E-Mail notifications.'
|
||||
end
|
||||
else
|
||||
flash[:alert] = "An error prohibited the registration for #{@conference.title}: "\
|
||||
flash[:error] = "An error prohibited the registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
|
|
@ -45,7 +45,7 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
redirect_to conference_conference_registrations_path(@conference.short_title),
|
||||
notice: 'Registration was successfully updated.'
|
||||
else
|
||||
flash[:alert] = "An error prohibited the registration for #{@conference.title}: "\
|
||||
flash[:error] = "An error prohibited the registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
|
|
@ -57,7 +57,7 @@ class ConferenceRegistrationsController < ApplicationController
|
|||
notice: "You are not registered for #{@conference.title} anymore!"
|
||||
else
|
||||
redirect_to root_path,
|
||||
alert: "An error prohibited deleting the registration for #{@conference.title}: "\
|
||||
error: "An error prohibited deleting the registration for #{@conference.title}: "\
|
||||
"#{@registration.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue