-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use variants for admin users to change behaviour for self vs others
- Loading branch information
Showing
7 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<%= form.govuk_text_field :email %> | ||
<%= form.govuk_text_field :name %> | ||
<%= form.govuk_password_field :password, label: { text: "Password (optional)" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<%= form.govuk_text_field :email %> | ||
<%= form.govuk_text_field :name %> | ||
<%= form.govuk_password_field :password, label: { text: "Password#{' (optional)' if form.object.persisted?}" } %> | ||
<%= form.govuk_check_box_field :archived if form.object.persisted? %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<%# locals: (admin:) %> | ||
<% content_for :header do %> | ||
<%= render Koi::Header::ShowComponent.new(resource: admin) %> | ||
<% end %> | ||
<%= render Koi::SummaryListComponent.new(model: admin, class: "item-table") do |builder| %> | ||
<%= builder.text :name %> | ||
<%= builder.text :email %> | ||
<%= builder.date :created_at %> | ||
<%= builder.date :last_sign_in_at, label: { text: "Last sign in" } %> | ||
<% end %> | ||
|
||
<h3>Passkeys</h3> | ||
|
||
<%= render "admin/credentials/credentials", admin: %> | ||
|
||
<div class="actions-group"> | ||
<%= kpop_link_to "Add this device", new_admin_admin_user_credential_path(admin), class: "button button--primary" %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters