summaryrefslogtreecommitdiff
path: root/app/views/checkpoints/new.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/checkpoints/new.html.erb')
-rw-r--r--app/views/checkpoints/new.html.erb31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/checkpoints/new.html.erb b/app/views/checkpoints/new.html.erb
new file mode 100644
index 0000000..fc61e9f
--- /dev/null
+++ b/app/views/checkpoints/new.html.erb
@@ -0,0 +1,31 @@
+<%= form_with model: [@run, @checkpoint] do |f| %>
+ <div>
+ <%= f.label :title %>
+ <%= f.text_field :title %>
+ </div>
+
+ <div>
+ <%= f.label :description %>
+ <%= f.text_area :description %>
+ </div>
+
+ <div>
+ <%= f.label :save_file %>
+ <%= f.file_field :save_file %>
+ </div>
+
+ <div>
+ <%= f.submit "Submit checkpoint" %>
+ </div>
+
+ <% if @checkpoint.errors.any? %>
+ <div>
+ <p><%= pluralize(@checkpoint.errors.count, "error") %> prohibited this checkpoint from being saved:</p>
+ <ul>
+ <% @checkpoint.errors.full_messages.each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+<% end %>