forked from shibao/cannery
improve user settings
This commit is contained in:
parent
56dae6cdfe
commit
ad1e44fd42
@ -1,5 +1,5 @@
|
||||
<div class="mx-auto pb-8 max-w-2xl flex flex-col justify-center items-center text-center space-y-4">
|
||||
<h1 class="pb-4 title text-primary-600 text-xl">
|
||||
<div class="mx-auto pb-8 max-w-2xl flex flex-col justify-center items-center text-right space-y-4">
|
||||
<h1 class="pb-4 title text-primary-600 text-2xl text-center">
|
||||
<%= gettext("Settings") %>
|
||||
</h1>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
action={Routes.user_settings_path(@conn, :update)}
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||
<h3 class="title text-primary-600 text-lg text-center col-span-3">
|
||||
<%= dgettext("actions", "Change email") %>
|
||||
</h3>
|
||||
|
||||
@ -19,9 +19,7 @@
|
||||
:if={@email_changeset.action && not @email_changeset.valid?()}
|
||||
class="alert alert-danger col-span-3"
|
||||
>
|
||||
<p>
|
||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= hidden_input(f, :action, name: "action", value: "update_email") %>
|
||||
@ -55,7 +53,7 @@
|
||||
action={Routes.user_settings_path(@conn, :update)}
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<h3 class="title text-primary-600 text-lg col-span-3">
|
||||
<h3 class="title text-primary-600 text-lg text-center col-span-3">
|
||||
<%= dgettext("actions", "Change password") %>
|
||||
</h3>
|
||||
|
||||
@ -63,9 +61,7 @@
|
||||
:if={@password_changeset.action && not @password_changeset.valid?()}
|
||||
class="alert alert-danger col-span-3"
|
||||
>
|
||||
<p>
|
||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= hidden_input(f, :action, name: "action", value: "update_password") %>
|
||||
@ -109,25 +105,28 @@
|
||||
:let={f}
|
||||
for={@locale_changeset}
|
||||
action={Routes.user_settings_path(@conn, :update)}
|
||||
class="flex flex-col space-y-4 justify-center items-center"
|
||||
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
|
||||
>
|
||||
<h3 class="title text-primary-600 text-lg">
|
||||
<h3 class="title text-primary-600 text-lg text-center col-span-3">
|
||||
<%= dgettext("actions", "Change Language") %>
|
||||
</h3>
|
||||
|
||||
<p :if={@locale_changeset.action && not @locale_changeset.valid?} class="alert alert-danger">
|
||||
<div
|
||||
:if={@locale_changeset.action && not @locale_changeset.valid?}
|
||||
class="alert alert-danger col-span-3"
|
||||
>
|
||||
<%= dgettext("errors", "Oops, something went wrong! Please check the errors below.") %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= hidden_input(f, :action, name: "action", value: "update_locale") %>
|
||||
|
||||
<%= select(f, :locale, [{gettext("English"), "en_US"}, {"Spanish", "es"}],
|
||||
class: "mx-2 my-1 min-w-md input input-primary"
|
||||
class: "mx-2 my-1 min-w-md input input-primary col-span-3"
|
||||
) %>
|
||||
<%= error_tag(f, :locale) %>
|
||||
<%= error_tag(f, :locale, "col-span-3") %>
|
||||
|
||||
<%= submit(dgettext("actions", "Change language"),
|
||||
class: "whitespace-nowrap mx-auto btn btn-primary",
|
||||
class: "whitespace-nowrap mx-auto btn btn-primary col-span-3",
|
||||
data: [qa: dgettext("prompts", "Are you sure you want to change your language?")]
|
||||
) %>
|
||||
</.form>
|
||||
|
@ -11,18 +11,18 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:15
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:45
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change email"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:59
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:101
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:57
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:97
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:143
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Delete User"
|
||||
msgstr ""
|
||||
@ -93,12 +93,12 @@ msgstr ""
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:115
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change Language"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:129
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change language"
|
||||
msgstr ""
|
||||
|
@ -10,7 +10,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:80
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Confirm new password"
|
||||
msgstr ""
|
||||
@ -20,8 +20,8 @@ msgstr ""
|
||||
msgid "Confirm your account"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:33
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:89
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:31
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Current password"
|
||||
msgstr ""
|
||||
@ -53,7 +53,7 @@ msgstr ""
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:73
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
@ -135,7 +135,7 @@ msgid "Uses left"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_registration/new.html.heex:32
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:124
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
@ -11,18 +11,18 @@ msgstr ""
|
||||
"Language: en\n"
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:15
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:45
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:43
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change email"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:59
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:101
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:57
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:97
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:143
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:142
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Delete User"
|
||||
msgstr ""
|
||||
@ -93,12 +93,12 @@ msgstr ""
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:115
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:111
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change Language"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:129
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Change language"
|
||||
msgstr ""
|
||||
|
@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Language: en\n"
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:80
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:76
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Confirm new password"
|
||||
msgstr ""
|
||||
@ -20,8 +20,8 @@ msgstr ""
|
||||
msgid "Confirm your account"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:33
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:89
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:31
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:85
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Current password"
|
||||
msgstr ""
|
||||
@ -53,7 +53,7 @@ msgstr ""
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:73
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:69
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New password"
|
||||
msgstr ""
|
||||
@ -135,7 +135,7 @@ msgid "Uses left"
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_registration/new.html.heex:32
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:124
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:123
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
@ -128,9 +128,9 @@ msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_registration/new.html.heex:13
|
||||
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:13
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:23
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:67
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:119
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:22
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:64
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:118
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Oops, something went wrong! Please check the errors below."
|
||||
msgstr ""
|
||||
|
@ -20,7 +20,7 @@ msgstr ""
|
||||
msgid "A link to confirm your email change has been sent to the new address."
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:141
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete your account?"
|
||||
msgstr ""
|
||||
@ -86,7 +86,7 @@ msgstr ""
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:131
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to change your language?"
|
||||
msgstr ""
|
||||
|
@ -125,9 +125,9 @@ msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_registration/new.html.heex:13
|
||||
#: lib/lokal_web/templates/user_reset_password/edit.html.heex:13
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:23
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:67
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:119
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:22
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:64
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:118
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Oops, something went wrong! Please check the errors below."
|
||||
msgstr ""
|
||||
|
@ -20,7 +20,7 @@ msgstr ""
|
||||
msgid "A link to confirm your email change has been sent to the new address."
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:141
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:140
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to delete your account?"
|
||||
msgstr ""
|
||||
@ -86,7 +86,7 @@ msgstr ""
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:131
|
||||
#: lib/lokal_web/templates/user_settings/edit.html.heex:130
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Are you sure you want to change your language?"
|
||||
msgstr ""
|
||||
|
Loading…
Reference in New Issue
Block a user