mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 07:25:19 +02:00
Ensure the condition group "Add condition" button is type button to avoid form submission
This commit is contained in:
parent
f92c4d62a4
commit
8926aa2171
2 changed files with 2 additions and 1 deletions
|
@ -48,6 +48,7 @@
|
|||
text: "Add condition",
|
||||
leading_icon: "plus",
|
||||
variant: "ghost",
|
||||
type: "button",
|
||||
data: { action: "rule--conditions#addSubCondition" }
|
||||
) %>
|
||||
</li>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<section class="space-y-4">
|
||||
<h3 class="text-sm font-medium text-primary">If <%= rule.resource_type %></h3>
|
||||
|
||||
<%# Condition template, used by Stimulus controller to add new conditions dynamically %>
|
||||
<%# Condition Group template, used by Stimulus controller to add new conditions dynamically %>
|
||||
<template data-rules-target="conditionGroupTemplate">
|
||||
<%= f.fields_for :conditions, Rule::Condition.new(rule: rule, condition_type: "compound", operator: "and"), child_index: "IDX_PLACEHOLDER" do |cf| %>
|
||||
<%= render "rule/conditions/condition_group", form: cf %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue