-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32308b8
commit 790791e
Showing
9 changed files
with
167 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETEME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
lib/women_in_tech_vic_web/live/user_settings_live.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<section class="relative text-gray-400 min-w-full"> | ||
<div | ||
class="absolute inset-0 bg-cover bg-center" | ||
style="background-image: url('/images/code.jpg'); opacity: 0.3;" | ||
> | ||
</div> | ||
|
||
<div class="relative p-8 mx-auto max-w-3xl text-right md:text-center font-semibold font-sans text-2xl md:text-3xl md:tracking-widest z-10 text-gray-200"> | ||
Account Settings | ||
</div> | ||
</section> | ||
<.link | ||
navigate={~p"/home"} | ||
class="text-gray-200 mb-0 m-8 hover:text-gray-400 font-semibold uppercase flex items-center space-x-1" | ||
> | ||
<.icon name="hero-chevron-double-left" class="h-5 w-5" /> | ||
<span>Home</span> | ||
</.link> | ||
|
||
<section class="w-full flex justify-center px-6 py-20 lg:px-8"> | ||
<div class="w-full max-w-2xl space-y-12 divide-y 6 px-6 pb-12 rounded-lg shadow-md mb-8 border border-gray-300 bg-gradient-to-r from-pink-200 via-gray-100 to-pink-300"> | ||
<div> | ||
<.simple_form | ||
for={@subscriptions_form} | ||
id="subscriptions_form" | ||
phx-submit="update_subscriptions" | ||
> | ||
<h3 class="block text font-semibold leading-6 text-zinc-800"> | ||
Update your subscriptions | ||
</h3> | ||
<%= for subscription <- @subscription_types do %> | ||
<.input | ||
field={@subscriptions_form[subscription]} | ||
type="checkbox" | ||
name={to_string(subscription)} | ||
value={subscription in @user_subscription_types} | ||
label={subscription |> to_string() |> String.capitalize()} | ||
phx-hook="SubscriptionChangeHook" | ||
/> | ||
<% end %> | ||
<:actions> | ||
<.button | ||
id="save-changes-button" | ||
disabled="true" | ||
class="disabled:pointer-events-none" | ||
phx-disable-with="Changing..." | ||
> | ||
Save Changes | ||
</.button> | ||
</:actions> | ||
</.simple_form> | ||
</div> | ||
|
||
<div> | ||
<.simple_form | ||
for={@email_form} | ||
id="email_form" | ||
phx-submit="update_email" | ||
phx-change="validate_email" | ||
> | ||
<.input field={@email_form[:email]} type="email" label="New Email" required /> | ||
<.input | ||
field={@email_form[:current_password]} | ||
name="current_password" | ||
id="current_password_for_email" | ||
type="password" | ||
label="Current password" | ||
value={@email_form_current_password} | ||
required | ||
/> | ||
<:actions> | ||
<.button phx-disable-with="Changing...">Change Email</.button> | ||
</:actions> | ||
</.simple_form> | ||
</div> | ||
<div> | ||
<.simple_form | ||
for={@password_form} | ||
id="password_form" | ||
action={~p"/users/log_in?_action=password_updated"} | ||
method="post" | ||
phx-change="validate_password" | ||
phx-submit="update_password" | ||
phx-trigger-action={@trigger_submit} | ||
> | ||
<input | ||
name={@password_form[:email].name} | ||
type="hidden" | ||
id="hidden_user_email" | ||
value={@current_email} | ||
/> | ||
<.input | ||
field={@password_form[:password]} | ||
type="password" | ||
label="New password" | ||
required | ||
phx-debounce | ||
/> | ||
<.input | ||
field={@password_form[:password_confirmation]} | ||
type="password" | ||
label="Confirm new password" | ||
phx-debounce | ||
/> | ||
<.input | ||
field={@password_form[:current_password]} | ||
name="current_password" | ||
type="password" | ||
label="Current password" | ||
id="current_password_for_password" | ||
value={@current_password} | ||
required | ||
/> | ||
<:actions> | ||
<.button phx-disable-with="Changing...">Change Password</.button> | ||
</:actions> | ||
</.simple_form> | ||
</div> | ||
<div> | ||
<.simple_form | ||
for={@delete_account_form} | ||
id="delete_account_form" | ||
phx-submit="delete_account" | ||
> | ||
<.input field={@delete_account_form[:password]} type="password" label="Password" required /> | ||
<:actions> | ||
<.button data-confirm="Are you sure?" phx-disable-with="Changing..."> | ||
Delete Account | ||
</.button> | ||
</:actions> | ||
</.simple_form> | ||
</div> | ||
</div> | ||
</section> |
Oops, something went wrong.