Skip to content

Commit

Permalink
fix: ux modal for the admin to a group
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdeus committed Dec 19, 2024
1 parent 82b3f38 commit 9b10811
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion decidim-core/app/cells/decidim/group_admins/show.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<%= link_to(
decidim.demote_group_manage_user_path(model.nickname, membership),
method: :post,
data: { confirm: t("decidim.group_admins.actions.are_you_sure") },
data: { confirm: t("decidim.group_admins.actions.remove_from_admin_confirm") },
class: "button button__sm button__transparent-secondary"
) do %>
<span><%= t("decidim.group_admins.actions.demote_admin") %></span>
Expand Down
4 changes: 2 additions & 2 deletions decidim-core/app/cells/decidim/group_members/show.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
t("decidim.group_members.actions.promote_to_admin"),
decidim.promote_group_manage_user_path(model.nickname, membership),
method: :post,
data: { confirm: t("decidim.group_members.actions.are_you_sure") },
data: { confirm: t("decidim.group_members.actions.promote_to_admin_confirm") },
class: "button button__sm button__transparent-secondary"
) %>

<%= link_to(
decidim.group_manage_user_path(model.nickname, membership),
method: :delete,
data: { confirm: t("decidim.group_members.actions.are_you_sure") },
data: { confirm: t("decidim.group_members.actions.remove_from_group_confirm") },
class: "button button__sm button__transparent-secondary"
) do %>
<span><%= t("decidim.group_members.actions.remove_from_group") %></span>
Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/packs/stylesheets/decidim/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

[data-dialog-container] {
@apply grid grid-cols-[auto_1fr] items-start md:items-center gap-2 text-left;
@apply flex flex-col items-start gap-2 text-left;

> svg {
@apply w-6 h-6 text-gray fill-current flex-none;
Expand Down
5 changes: 2 additions & 3 deletions decidim-core/app/views/decidim/shared/_confirm_modal.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%= decidim_modal id: "confirm-modal" do %>
<div data-dialog-container>
<%= icon "delete-bin-line" %>
<h2 class="h2" data-dialog-title id="dialog-title-confirm-modal"><%= t("title", scope: "decidim.shared.confirm_modal") %></h2>
<h2 class="h2" data-dialog-title id="dialog-title-confirm-modal"><%= t("title", scope: "decidim.group_members.actions.confirm_modal") %></h2>

<div data-confirm-modal-content></div>
</div>
Expand All @@ -11,7 +10,7 @@
<span><%= t("cancel", scope: "decidim.shared.confirm_modal") %></span>
</button>
<button class="button button__lg button__secondary" data-confirm-ok>
<span><%= t("ok", scope: "decidim.shared.confirm_modal") %></span>
<span><%= t("ok", scope: "decidim.group_members.actions.confirm_modal") %></span>
</button>
</div>
<% end %>

0 comments on commit 9b10811

Please sign in to comment.