1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 15:35:22 +02:00

Fix double headers with new DialogComponent

This commit is contained in:
hatz 2025-05-02 19:40:53 -05:00
parent bc5553b156
commit 05147aadf9
No known key found for this signature in database
2 changed files with 17 additions and 11 deletions

View file

@ -1,10 +1,13 @@
<%= render DialogComponent.new(reload_on_close: true) do |dialog| %>
<% if @rule.name.present? %>
<%= dialog.with_header(title: "Confirm changes to \"#{@rule.name}\"") %>
<% else %>
<%= dialog.with_header(title: "Confirm changes") %>
<% end %>
<%
title = if @rule.name.present?
"Confirm changes to \"#{@rule.name}\""
else
"Confirm changes"
end
%>
<% dialog.with_header(title: title) %>
<% dialog.with_body do %>
<p class="text-secondary text-sm mb-4">
You are about to apply this rule to

View file

@ -1,11 +1,14 @@
<%= link_to "Back to rules", rules_path %>
<%= render DialogComponent.new do |dialog| %>
<% if @rule.name.present? %>
<%= dialog.with_header(title: "Edit #{@rule.resource_type} rule \"#{@rule.name}\"") %>
<% else %>
<%= dialog.with_header(title: "Edit #{@rule.resource_type} rule") %>
<% end %>
<%
title = if @rule.name.present?
"Edit #{@rule.resource_type} rule \"#{@rule.name}\""
else
"Edit #{@rule.resource_type} rule"
end
%>
<% dialog.with_header(title: title) %>
<% dialog.with_body do %>
<%= render "rules/form", rule: @rule %>