summaryrefslogtreecommitdiff
path: root/app/views/admin/participants/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/participants/_form.html.erb')
-rw-r--r--app/views/admin/participants/_form.html.erb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/views/admin/participants/_form.html.erb b/app/views/admin/participants/_form.html.erb
index 7b79e9b..f426ca8 100644
--- a/app/views/admin/participants/_form.html.erb
+++ b/app/views/admin/participants/_form.html.erb
@@ -18,7 +18,17 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
-->
-<%= form.error_messages %>
+<% if @participant.errors.any? %>
+<div id="error_explanation">
+ <h2><%= pluralize(@participant.errors.count, "error") %> prohibited
+ this Participant from being updated</h2>
+ <ul>
+ <% @participant.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+</div>
+<% end %>
<p><label for="participant_name" class="box2 table-resource-label">Name:</label>
<%= form.text_field :name %></p>
@@ -67,7 +77,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>.
<th style="width:60%">Description (optional):</th>
<th style="width:10%">delete</th>
</tr>
- <% form.fields_for :identities do |ident| %>
+ <%= form.fields_for :identities do |ident| %>
<tr align="left" valign="top">
<td><%= ident.text_field :name, :style => "width:100%" %></td>
<TD><%= ident.text_area :description, :rows => 1, :style => "width:100%" %></TD>