Refactor settings routes and menu

Use sub controllers/routes for the sections
This commit is contained in:
Râu Cao
2022-12-21 18:10:50 +07:00
parent cf48f76553
commit 445a1c80a6
9 changed files with 44 additions and 15 deletions

View File

@@ -1 +0,0 @@
<h2>Settings</h2>

View File

@@ -0,0 +1,9 @@
<%= render HeaderComponent.new(title: "Settings") %>
<%= render MainWithSidenavComponent.new(sidenav_partial: 'shared/sidenav_settings') do %>
<section>
<h3>Profile</h3>
<p class="mb-12">
</p>
</section>
<% end %>

View File

@@ -0,0 +1,13 @@
<%= render HeaderComponent.new(title: "Settings") %>
<%= render MainWithSidenavComponent.new(sidenav_partial: 'shared/sidenav_settings') do %>
<section>
<h3>Password</h3>
<p class="mb-12">Use the following button to request an email with a password reset link:</p>
<p>
<%= form_with(url: settings_reset_password_path, method: :post) do %>
<%= submit_tag("Send me a password reset link", class: 'btn-md btn-gray w-full sm:w-auto') %>
<% end %>
</p>
</section>
<% end %>