mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-07 15:21:58 +08:00
Currently, herb/formatter has at least 4 bugs the prevent us from switching to it (https://github.com/marcoroth/herb/issues 476, 477, 478, and 479). This includes manual fixes for each issue. herb/formatter also introduces a rubocop violation for the Layout/AssignmentIndentation cop. This disables that cop.
53 lines
2 KiB
Text
53 lines
2 KiB
Text
<% action = rodauth.has_password? ? "Change" : "Create"
|
|
@page_title = "#{action} Password" %>
|
|
|
|
<%== part("components/page_header", title: "My Account") %>
|
|
|
|
<main>
|
|
<div class="max-w-screen-xl pb-6 lg:pb-16">
|
|
<div class="overflow-hidden rounded-lg bg-white shadow">
|
|
<div
|
|
class="
|
|
divide-y divide-gray-200 lg:grid lg:grid-cols-12 lg:divide-x
|
|
lg:divide-y-0
|
|
"
|
|
>
|
|
<%== render("account/submenu") %>
|
|
<div
|
|
class="
|
|
divide-y divide-gray-200 lg:col-span-8 xl:col-span-9
|
|
2xl:col-span-10 pb-10
|
|
"
|
|
>
|
|
<div class="px-4 py-6 sm:p-6 lg:pb-8 space-y-4">
|
|
<h2 class="text-lg font-medium leading-6 text-gray-900">
|
|
<%= action %> Password
|
|
</h2>
|
|
<% form(action: rodauth.change_password_path, role: :form, method: :post) do %>
|
|
<%== rodauth.change_password_additional_form_tags %>
|
|
<div class="mt-6 grid grid-cols-6 gap-6">
|
|
<% if rodauth.change_password_requires_password? %>
|
|
<div class="col-span-6 sm:col-span-3 xl:col-span-2">
|
|
<%== part("components/rodauth/password_field", label: "Current Password") %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="col-span-6 sm:col-span-3 xl:col-span-2">
|
|
<%== part("components/rodauth/password_field", label: "#{rodauth.new_password_label}#{rodauth.input_field_label_suffix}", name: rodauth.new_password_param, autocomplete: "new-password") %>
|
|
</div>
|
|
|
|
<div class="col-span-6 sm:col-span-3 xl:col-span-2">
|
|
<%== part("components/rodauth/password_field", label: "New Password Confirmation", confirm: true) %>
|
|
</div>
|
|
|
|
<div class="col-span-6">
|
|
<%== part("components/form/submit_button", text: "#{action} Password") %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|