From dec675543eaf02d279ff3395a634ab0c244737b7 Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 2 Nov 2023 17:42:02 -0400 Subject: Runs#new page title, desc, and format --- app/views/runs/new.html.erb | 54 +++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/app/views/runs/new.html.erb b/app/views/runs/new.html.erb index 0c5c3ad..3471828 100644 --- a/app/views/runs/new.html.erb +++ b/app/views/runs/new.html.erb @@ -1,31 +1,37 @@ -<%= form_with model: @run do |f| %> -
- <%= f.label :game_id, "Game" %> - <%= f.collection_select :game_id, Game.all, :id, :title, {prompt: "Choose..."} %> -
+
+

Start a run

-
- <%= f.label :title %> - <%= f.text_field :title %> -
+

This run will start checked out to you.

-
- <%= f.label :description %> - <%= f.text_area :description %> -
+ <%= form_with model: @run, class: "space-y-4" do |f| %> +
+ <%= f.label :game_id, "Game" %> + <%= f.collection_select :game_id, Game.all, :id, :title, {prompt: "Choose..."} %> +
+ +
+ <%= f.label :title %> + <%= f.text_field :title %> +
-
- <%= f.submit "Start run", class: "btn-primary" %> -
+
+ <%= f.label :description %> + <%= f.text_area :description %> +
- <% if @run.errors.any? %>
-

<%= pluralize(@run.errors.count, "error") %> prohibited this run from being saved:

-
    - <% @run.errors.full_messages.each do |message| %> -
  • <%= message %>
  • - <% end %> -
+ <%= f.submit "Start run", class: "btn-primary" %>
+ + <% if @run.errors.any? %> +
+

<%= pluralize(@run.errors.count, "error") %> prohibited this run from being saved:

+
    + <% @run.errors.full_messages.each do |message| %> +
  • <%= message %>
  • + <% end %> +
+
+ <% end %> <% end %> -<% end %> +
-- cgit v1.2.3