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:
parent
bc5553b156
commit
05147aadf9
2 changed files with 17 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue