forked from nodunayo/speakerline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue nodunayo#154 - Style error messages
- Loading branch information
Showing
13 changed files
with
70 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#error_explanation { | ||
border-color: #9d3515; | ||
background-color: #FCEDE9; | ||
} | ||
|
||
.error { | ||
color: #9d3515; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<%-# locals: errors, object_type %> | ||
|
||
<fieldset class="fieldset" id="error_explanation"> | ||
<legend class="error">Warning</legend> | ||
<p>We couldn't save this <%= object_type %>, because:</p> | ||
<ul> | ||
<% errors.full_messages.each do |msg| %> | ||
<li class="error"><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
<% if @submission.errors.any? %> | ||
<div id="error_explanation"> | ||
<h5>We couldn't save this submission because:</h5> | ||
<ul> | ||
<% @submission.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<%= render "shared/form_error_display", errors: @submission.errors, | ||
object_type: "submission" %> | ||
<% end %> | ||
|
||
<h3>Add a submission</h3> | ||
|
||
<%= form_for @submission, url: {action: 'create'} do |f| %> | ||
<%= f.hidden_field(:proposal_id, value: @proposal.id) %> | ||
<%= f.grouped_collection_select(:event_instance_id, @events, :instances, :name, :id, :name_and_year) %> | ||
<%= f.label(:result_accepted, "Accepted") %> | ||
<%= f.radio_button(:result, :accepted) %> | ||
<%= f.label(:result_rejected, "Rejected") %> | ||
<%= f.radio_button(:result, :rejected) %> | ||
<%= f.label(:result_waitlisted, "Waitlisted") %> | ||
<%= f.radio_button(:result, :waitlisted) %> | ||
<%= f.label :result_accepted do %> | ||
<%= f.radio_button(:result, :accepted) %> | ||
Accepted | ||
<% end %> | ||
<%= f.label :result_rejected do %> | ||
<%= f.radio_button(:result, :rejected) %> | ||
Rejected | ||
<% end %> | ||
<%= f.label :result_waitlisted do %> | ||
<%= f.radio_button(:result, :waitlisted) %> | ||
Waitlisted | ||
<% end %> | ||
<%= recaptcha_tags %> | ||
<%= f.submit "Add submission" %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters