philomena/lib/philomena_web/templates/registration/edit.html.slime

68 lines
2 KiB
Text
Raw Normal View History

2019-11-12 23:49:37 -05:00
h1 Account Settings
p
' Looking for your content settings?
a<> href="/settings/edit" Click here!
p
2020-08-18 00:05:22 +02:00
' Looking for two factor authentication?
2019-11-12 23:49:37 -05:00
= link "Click here!", to: Routes.registration_totp_path(@conn, :edit)
2019-12-07 11:26:45 -05:00
p
' Looking to change your avatar?
= link "Click here!", to: Routes.avatar_path(@conn, :edit)
= if can?(@conn, :change_username, @current_user) do
p
' Looking to change your username?
= link "Click here!", to: Routes.registration_name_path(@conn, :edit)
2019-11-12 23:49:37 -05:00
h3 API Key
p
' Your API key is
2019-11-15 10:32:26 -05:00
code>
= @current_user.authentication_token
2019-11-12 23:49:37 -05:00
' - you can use this to allow API consumers to access your account.
2019-11-15 10:32:26 -05:00
p
' Avoid sharing this key with others, as it could be used to compromise
' your account.
2019-11-12 23:49:37 -05:00
h3 Change email
2019-11-12 23:49:37 -05:00
= form_for @email_changeset, Routes.registration_email_path(@conn, :create), [method: :post], fn f ->
= if @email_changeset.action do
2019-11-12 23:49:37 -05:00
.alert.alert-danger
p Oops, something went wrong! Please check the errors below.
.field
= email_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ".*@.*"
2019-11-12 23:49:37 -05:00
= error_tag f, :email
.field
= password_input f, :current_password, class: "input", required: true, name: "current_password", placeholder: "Current password"
= error_tag f, :current_password
div
= submit "Change email", class: "button"
h3 Change password
= form_for @password_changeset, Routes.registration_password_path(@conn, :update), fn f ->
= if @password_changeset.action do
.alert.alert-danger
p Oops, something went wrong! Please check the errors below.
2019-11-12 23:49:37 -05:00
.field
= password_input f, :password, class: "input", placeholder: "New password"
= error_tag f, :password
.field
2020-01-26 18:09:37 -05:00
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password"
= error_tag f, :password_confirmation
2019-11-12 23:49:37 -05:00
.field
= password_input f, :current_password, name: "current_password", class: "input", placeholder: "Current password"
= error_tag f, :current_password
2019-11-12 23:49:37 -05:00
= submit "Change password", class: "button"