Allow the user to delete their own account

This commit is contained in:
Jyri-Petteri Paloposki 2020-08-11 01:18:10 +03:00
parent f8cf140bf4
commit 46b8d3ce9f
7 changed files with 43 additions and 8 deletions

View file

@ -0,0 +1,4 @@
<p><%= t 'preferences.remove_introduction' %></p>
<div class="form-group">
<%= profile_delete_user(@user) %>
</div>

View file

@ -21,16 +21,20 @@
<li role="presentation">
<%= link_to t('preferences.tabs.tracks_behavior'), "#behavior", data: { toggle: "tab" } %>
</li>
<li role="presentation">
<%= link_to t('preferences.tabs.remove_account'), "#remove_account", data: { toggle: "tab" } %>
</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="profile"><%= render :partial => 'profile'%></div>
<div role="tabpanel" class="tab-pane" id="authentication"><%= render :partial => 'authentication'%></div>
<div role="tabpanel" class="tab-pane" id="date_and_time"><%= render :partial => 'date_and_time'%></div>
<div role="tabpanel" class="tab-pane" id="behavior"><%= render :partial => 'tracks_behavior'%></div>
<div role="tabpanel" class="tab-pane" id="remove_account"><%= render :partial => 'remove_account'%></div>
</div>
<div class="btn-group" role="group" aria-label="Basic example">
<button type="submit" id="prefs_submit" class="btn btn-default"><%= t('common.update') %></button>
</div>
<button type="submit" id="prefs_submit" class="btn btn-default"><%= t('common.update') %></button>
<% end %>
</div>
</div>