Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
<% content_for :title, t('account_deletion.title') %>
<div class="container mx-auto px-4 py-8">
<div class="max-w-md mx-auto bg-surface-raised rounded-lg shadow-md p-6">
<h1 class="text-2xl font-bold text-red-600 mb-6 text-center">
<i class="bi bi-exclamation-triangle inline mr-2"></i>
<%= t('account_deletion.title') %>
</h1>
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4 mb-6">
<p class="text-yellow-800">
<strong><%= t('account_deletion.warning_title') %>:</strong> <%= t('account_deletion.warning_message') %>
</p>
</div>
<div class="mb-6">
<p class="text-gray-700 mb-4">
<%= t('account_deletion.before_proceeding') %>
</p>
<ul class="list-disc list-inside text-gray-600 space-y-2">
<li><%= t('account_deletion.consequence_data_deleted') %></li>
<li><%= t('account_deletion.consequence_removed_from_orgs') %></li>
<li><%= t('account_deletion.consequence_posts_anonymized') %></li>
<li><%= t('account_deletion.consequence_irreversible') %></li>
</ul>
</div>
<%# Export-before-delete hint (D3): with grace period 0 there is no window
after confirming — this is the user's last chance to pull their data. %>
<div class="bg-cream-100 border border-stroke rounded-lg p-4 mb-6">
<p class="text-gray-700">
<i class="bi bi-download mr-1"></i>
<%= t('account_deletion.export_hint') %>
<%= link_to t('account_deletion.export_link'), user_data_export_path, class: 'underline font-medium' %>
</p>
</div>
<%= form_with url: account_deletion_path, method: :post, local: true, class: "space-y-4" do |form| %>
<div>
<%= form.label :reason, t('account_deletion.reason_label'), class: "block text-sm font-medium text-gray-700 mb-2" %>
<%= form.text_area :reason,
placeholder: t('account_deletion.reason_placeholder'),
class: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-red-500 focus:border-red-500",
rows: 4,
maxlength: 500 %>
<p class="text-sm text-gray-500 mt-1"><%= t('account_deletion.max_characters') %></p>
</div>
<div>
<%= form.label :current_password, t('account_deletion.password_label'), class: "block text-sm font-medium text-gray-700 mb-2" %>
<%= form.password_field :current_password,
required: true,
autocomplete: 'current-password',
class: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-red-500 focus:border-red-500" %>
<p class="text-sm text-gray-500 mt-1"><%= t('account_deletion.password_help') %></p>
</div>
<div class="flex space-x-4">
<%= form.submit t('account_deletion.submit_button'),
class: "flex-1 bg-red-600 text-on-fill py-2 px-4 rounded-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition-colors",
data: {
turbo_confirm: t('account_deletion.confirm_message')
} %>
<%= link_to t('common.cancel'),
root_path,
class: "flex-1 bg-gray-300 text-gray-700 py-2 px-4 rounded-md hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 transition-colors text-center" %>
</div>
<% end %>
</div>
</div>