Add required to form fields
This commit is contained in:
parent
3881248603
commit
5116a9d031
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<%= form_with model: @game_system, url: do |f| %>
|
<%= form_with model: @game_system, url: do |f| %>
|
||||||
<%= f.label :name %>
|
<%= f.label :name %>
|
||||||
<%= f.text_field :name %>
|
<%= f.text_field :name, required: true %>
|
||||||
|
|
||||||
<%= f.submit button_text %>
|
<%= f.submit button_text %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<section class="inset">
|
<section class="inset">
|
||||||
<%= form_with url: sessions_path do |f| %>
|
<%= form_with url: sessions_path do |f| %>
|
||||||
<%= f.label :username %>
|
<%= f.label :username %>
|
||||||
<%= f.text_field :username %>
|
<%= f.text_field :username, required: true %>
|
||||||
|
|
||||||
<%= f.label :password %>
|
<%= f.label :password %>
|
||||||
<%= f.password_field :password %>
|
<%= f.password_field :password, required: true %>
|
||||||
|
|
||||||
<%= f.submit t(".log_in") %>
|
<%= f.submit t(".log_in") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
<%= form_with model: @table do |f| %>
|
<%= form_with model: @table do |f| %>
|
||||||
<%= f.label :name %>
|
<%= f.label :name %>
|
||||||
<%= f.text_field :name %>
|
<%= f.text_field :name, required: true %>
|
||||||
|
|
||||||
<%= f.label :game_system_id %>
|
<%= 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 %>
|
<%= f.submit button_text %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<section class="inset">
|
<section class="inset">
|
||||||
<%= form_with model: user do |f| %>
|
<%= form_with model: user do |f| %>
|
||||||
<%= f.label :username %>
|
<%= f.label :username %>
|
||||||
<%= f.text_field :username %>
|
<%= f.text_field :username, required: true %>
|
||||||
|
|
||||||
<%= f.label :first_name %>
|
<%= f.label :first_name %>
|
||||||
<%= f.text_field :first_name %>
|
<%= f.text_field :first_name %>
|
||||||
|
@ -12,13 +12,13 @@
|
||||||
<%= f.text_field :last_name %>
|
<%= f.text_field :last_name %>
|
||||||
|
|
||||||
<%= f.label :email %>
|
<%= f.label :email %>
|
||||||
<%= f.text_field :email %>
|
<%= f.text_field :email, required: true %>
|
||||||
|
|
||||||
<%= f.label :password %>
|
<%= f.label :password %>
|
||||||
<%= f.password_field :password %>
|
<%= f.password_field :password, required: true %>
|
||||||
|
|
||||||
<%= f.label :password_confirmation %>
|
<%= f.label :password_confirmation %>
|
||||||
<%= f.password_field :password_confirmation %>
|
<%= f.password_field :password_confirmation, required: true %>
|
||||||
|
|
||||||
<%= f.submit button_text %>
|
<%= f.submit button_text %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
1
todo.md
1
todo.md
|
@ -1,4 +1,5 @@
|
||||||
- Ensure form errors/flash show correctly
|
- Ensure form errors/flash show correctly
|
||||||
- Add players to tables
|
- Add players to tables
|
||||||
|
- notifications
|
||||||
- Add characters to users/tables
|
- Add characters to users/tables
|
||||||
- Character sheets/prototypes
|
- Character sheets/prototypes
|
||||||
|
|
Loading…
Reference in New Issue