summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-05 20:13:33 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-05 20:13:33 +0200
commit01987cc0b88fdb0748d8d71cca4f5e40ea8a2604 (patch)
tree4e24583b5a111f718a342df59fba62ccf439f4f2 /views
parent696be9ff4d6a6f7e3286cba14df4e4f449d31bb6 (diff)
downloadnorsk-urskog-registrations-01987cc0b88fdb0748d8d71cca4f5e40ea8a2604.tar.gz
norsk-urskog-registrations-01987cc0b88fdb0748d8d71cca4f5e40ea8a2604.tar.bz2
norsk-urskog-registrations-01987cc0b88fdb0748d8d71cca4f5e40ea8a2604.zip
Redirect back to form and display error if no songs specified.
Diffstat (limited to 'views')
-rw-r--r--views/layout.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/views/layout.erb b/views/layout.erb
index a6f8dd8..efda293 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -8,6 +8,17 @@
<title>Norsk Urskog 2015 - Påmeldingsskjema for band</title>
</head>
<body>
+ <% if @errors %>
+ <div class="error">
+ <h1 class="error-heading">Det er feil i skjemaet!</h1>
+ <p>Vennligst se over følgende og prøv igjen:</p>
+ <ul>
+ <% @errors.each do |err| %>
+ <li><%=h err %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
<%= yield %>
</body>
</html>