diff --git a/app/views/admin/game_systems/_form.html.erb b/app/views/admin/game_systems/_form.html.erb index 1367e21..be5e415 100644 --- a/app/views/admin/game_systems/_form.html.erb +++ b/app/views/admin/game_systems/_form.html.erb @@ -1,8 +1,8 @@ -<% # locals: (game_system: @game_system, button_text:, url:) %> +<%# locals: (game_system: @game_system, button_text:, url:) %> <%= form_with model: @game_system, url: do |f| %> <%= f.label :name %> - <%= f.text_field :name %> + <%= f.text_field :name, required: true %> <%= f.submit button_text %> <% end %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 48372cd..33427d2 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -5,10 +5,10 @@
<%= form_with url: sessions_path do |f| %> <%= f.label :username %> - <%= f.text_field :username %> + <%= f.text_field :username, required: true %> <%= f.label :password %> - <%= f.password_field :password %> + <%= f.password_field :password, required: true %> <%= f.submit t(".log_in") %> <% end %> diff --git a/app/views/tables/_form.html.erb b/app/views/tables/_form.html.erb index d819d90..1596ad3 100644 --- a/app/views/tables/_form.html.erb +++ b/app/views/tables/_form.html.erb @@ -2,10 +2,10 @@ <%= form_with model: @table do |f| %> <%= f.label :name %> - <%= f.text_field :name %> + <%= f.text_field :name, required: true %> <%= f.label :game_system_id %> - <%= f.collection_select :game_system_id, GameSystem.all, :id, :name %> + <%= f.collection_select :game_system_id, GameSystem.all, :id, :name, required: true %> <%= f.submit button_text %> <% end %> diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 2a501e3..73f1515 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -3,7 +3,7 @@
<%= form_with model: user do |f| %> <%= f.label :username %> - <%= f.text_field :username %> + <%= f.text_field :username, required: true %> <%= f.label :first_name %> <%= f.text_field :first_name %> @@ -12,13 +12,13 @@ <%= f.text_field :last_name %> <%= f.label :email %> - <%= f.text_field :email %> + <%= f.text_field :email, required: true %> <%= f.label :password %> - <%= f.password_field :password %> + <%= f.password_field :password, required: true %> <%= f.label :password_confirmation %> - <%= f.password_field :password_confirmation %> + <%= f.password_field :password_confirmation, required: true %> <%= f.submit button_text %> <% end %> diff --git a/todo.md b/todo.md index 2bb8cd4..49b5a71 100644 --- a/todo.md +++ b/todo.md @@ -1,4 +1,5 @@ - Ensure form errors/flash show correctly - Add players to tables + - notifications - Add characters to users/tables - Character sheets/prototypes