Improve forms
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
= form_with model: contest do |form|
|
||||
.row
|
||||
.col.g-3
|
||||
.form-floating.mt-5
|
||||
.col
|
||||
.form-floating
|
||||
= form.text_field :name, autocomplete: "off", class: "form-control"
|
||||
= form.label :name, class: "required"
|
||||
div.mt-3
|
||||
= form.submit
|
||||
= form.submit "Create", class: "btn btn-primary"
|
@@ -4,13 +4,13 @@ html
|
||||
|
||||
body
|
||||
.container.mt-5
|
||||
.float-end.ms-3
|
||||
= button_to "Log out", session_path, method: :delete
|
||||
.float-end.mt-1.ms-3
|
||||
= button_to "Log out", session_path, method: :delete
|
||||
.float-end.mt-2.ms-3
|
||||
= link_to "Settings", user_path(@current_user)
|
||||
.float-end.mt-1
|
||||
.float-end.mt-2
|
||||
= link_to "Home", contests_path
|
||||
|
||||
h1 = @title
|
||||
h1.mb-4 = @title
|
||||
|
||||
= yield
|
@@ -1,9 +1,15 @@
|
||||
= form_with model: user do |form|
|
||||
.row.mb-3
|
||||
.col
|
||||
.input-group
|
||||
.input-group-text @
|
||||
.form-floating
|
||||
= form.text_field :username, autocomplete: "off", class: "form-control"
|
||||
= form.label :username, class: "required"
|
||||
.row.mb-3
|
||||
.col
|
||||
.form-floating
|
||||
= form.text_field :email_address, autocomplete: "off", class: "form-control", type: "email"
|
||||
= form.label :email_address, class: "required"
|
||||
div
|
||||
= form.label :username
|
||||
= form.text_field :username
|
||||
div
|
||||
= form.label :email_address
|
||||
= form.text_field :email_address
|
||||
div
|
||||
= form.submit
|
||||
= form.submit "Save", class: "btn btn-primary"
|
Reference in New Issue
Block a user