tabletop-companion/app/views/users/_form.html.erb

32 lines
939 B
Plaintext

<%# locals: (user:, button_text:) -%>
<section class="inset">
<%= form_with model: user do |f| %>
<%= f.label :username %>
<%= f.text_field :username, required: true %>
<%= display_form_errors(user, :username) %>
<%= f.label :first_name %>
<%= f.text_field :first_name %>
<%= display_form_errors(user, :first_name) %>
<%= f.label :last_name %>
<%= f.text_field :last_name %>
<%= display_form_errors(user, :last_name) %>
<%= f.label :email %>
<%= f.text_field :email, required: true %>
<%= display_form_errors(user, :email) %>
<%= f.label :password %>
<%= f.password_field :password, required: true %>
<%= display_form_errors(user, :password) %>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, required: true %>
<%= display_form_errors(user, :password_confirmation) %>
<%= f.submit button_text %>
<% end %>
</section>