Change update/save failures to use flash type :error instead of :alert
This commit is contained in:
parent
19c54bd935
commit
1c1e56ed46
10 changed files with 13 additions and 13 deletions
|
|
@ -90,7 +90,7 @@ module Admin
|
|||
notice: 'Conference was successfully updated.'
|
||||
else
|
||||
redirect_to edit_admin_conference_path(id: short_title),
|
||||
alert: 'Updating conference failed. ' \
|
||||
error: 'Updating conference failed. ' \
|
||||
"#{@conference.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ module Admin
|
|||
@event = @conference.program.events.find(params[:id])
|
||||
if !@event
|
||||
redirect_to admin_conference_program_events_path(conference_id: @conference.short_title),
|
||||
alert: 'Error! Could not find event!'
|
||||
error: 'Error! Could not find event!'
|
||||
return
|
||||
end
|
||||
@event
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ module Admin
|
|||
# GET questions/1/edit
|
||||
def edit
|
||||
if @question.global
|
||||
redirect_to admin_conference_questions_path(conference_id: @conference.short_title), alert: 'Sorry, you cannot edit global questions. Create a new one.'
|
||||
redirect_to admin_conference_questions_path(conference_id: @conference.short_title), error: 'Sorry, you cannot edit global questions. Create a new one.'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ module Admin
|
|||
if @splashpage.destroy
|
||||
redirect_to admin_conference_splashpage_path, notice: 'Splashpage was successfully destroyed.'
|
||||
else
|
||||
redirect_to admin_conference_splashpage_path, alert: 'An error prohibited this Splashpage from being destroyed: '\
|
||||
redirect_to admin_conference_splashpage_path, error: 'An error prohibited this Splashpage from being destroyed: '\
|
||||
"#{@splashpage.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ module Admin
|
|||
if @user.update_attributes(user_params)
|
||||
redirect_to admin_users_path, notice: "Updated #{@user.name} (#{@user.email})!" + message
|
||||
else
|
||||
redirect_to admin_users_path, alert: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
|
||||
redirect_to admin_users_path, error: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ module Admin
|
|||
if @venue.destroy
|
||||
redirect_to admin_conference_venue_path, notice: 'Venue was successfully deleted.'
|
||||
else
|
||||
redirect_to admin_conference_venue_path, alert: 'An error prohibited this Venue from being destroyed: '\
|
||||
redirect_to admin_conference_venue_path, error: 'An error prohibited this Venue from being destroyed: '\
|
||||
"#{@venue.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module Admin
|
|||
if @conference.update_attributes(conference_params)
|
||||
redirect_to admin_conference_volunteers_info_path(conference_id: params[:conference_id]), notice: 'Volunteering options were successfully updated.'
|
||||
else
|
||||
redirect_to admin_conference_volunteers_info_path(conference_id: params[:conference_id]), alert: "Volunteering options update failed: #{@conference.errors.full_messages.join '. '}"
|
||||
redirect_to admin_conference_volunteers_info_path(conference_id: params[:conference_id]), error: "Volunteering options update failed: #{@conference.errors.full_messages.join '. '}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue