44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
= form_with model: user, method: method do |form|
|
|
- if method == :patch
|
|
h4 General settings
|
|
|
|
.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"
|
|
= form.label :email_address, class: "required"
|
|
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.select :lang, Languages::AVAILABLE_LANGUAGES.map { |lang| [ lang[:name], lang[:id] ] }, {}, class: "form-select"
|
|
= form.label :lang
|
|
| Language
|
|
|
|
- if method == :post
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.password_field :password, autocomplete: "off", class: "form-control"
|
|
= form.label :password, class: "required"
|
|
= form.submit "Save", class: "btn btn-primary"
|
|
|
|
- if method == :patch
|
|
h4.mt-5 Change password
|
|
|
|
= form_with model: user, method: method do |form|
|
|
.row.mb-3
|
|
.col
|
|
.form-floating
|
|
= form.password_field :password, autocomplete: "off", class: "form-control"
|
|
= form.label :password, class: "required"
|
|
| New password
|
|
= form.submit "Save new password", class: "btn btn-primary" |