mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Add "Reset account" followed by sample data preload (#163)
* Add reset with sample data option on profile settings * No need for "member" user in preload * Cleanup/shorten copy
This commit is contained in:
@@ -137,9 +137,30 @@
|
||||
href: reset_user_path(@user),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.new(
|
||||
title: "Reset account?",
|
||||
body: "This will delete all data associated with your account. Your user profile will remain active.",
|
||||
btn_text: "Reset account",
|
||||
title: t(".confirm_reset.title"),
|
||||
body: t(".confirm_reset.body"),
|
||||
btn_text: t(".reset_account"),
|
||||
destructive: true,
|
||||
high_severity: true
|
||||
)
|
||||
) %>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
|
||||
<div class="w-full md:w-2/3">
|
||||
<h3 class="font-medium text-primary"><%= t(".reset_account_with_sample_data") %></h3>
|
||||
<p class="text-secondary text-sm"><%= t(".reset_account_with_sample_data_warning") %></p>
|
||||
</div>
|
||||
|
||||
<%= render DS::Button.new(
|
||||
text: t(".reset_account_with_sample_data"),
|
||||
variant: "destructive",
|
||||
href: reset_with_sample_data_user_path(@user),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.new(
|
||||
title: t(".confirm_reset_with_sample_data.title"),
|
||||
body: t(".confirm_reset_with_sample_data.body"),
|
||||
btn_text: t(".reset_account_with_sample_data"),
|
||||
destructive: true,
|
||||
high_severity: true
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user