N°8772 - Form dependencies manager implementation

- turbo implementation
This commit is contained in:
Benjamin Dalsass
2025-10-22 08:16:44 +02:00
parent 1a4a64cec1
commit ee745f8be9
6 changed files with 13 additions and 6 deletions

View File

@@ -45,4 +45,8 @@
height: 30px;
display: flex;
align-items: center;
}
}
form[aria-busy="true"] {
opacity: .5;
}

View File

@@ -3,7 +3,7 @@
'name' => 'combodo/itop',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '19d062aa830b6d6c7d17ac4046fc9ee2c5e3fab1',
'reference' => '0dae7346d1b2a912c1d88dddf8bbe9267a19ab90',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -22,7 +22,7 @@
'combodo/itop' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '19d062aa830b6d6c7d17ac4046fc9ee2c5e3fab1',
'reference' => '0dae7346d1b2a912c1d88dddf8bbe9267a19ab90',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),

View File

@@ -68,7 +68,6 @@ class DependencyHandler
// Listen the dependency
$this->builder->get($sDependency)->addEventListener(FormEvents::POST_SET_DATA, $this->GetEventListeningCallback());
$this->builder->get($sDependency)->addEventListener(FormEvents::POST_SUBMIT, $this->GetEventListeningCallback());
}
}

View File

@@ -6,6 +6,8 @@ use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
class FormTypeExtension extends AbstractTypeExtension
@@ -24,7 +26,7 @@ class FormTypeExtension extends AbstractTypeExtension
'inputs',
'outputs',
'bindings',
'listener_callback'
'listener_callback',
]);
}
@@ -36,4 +38,6 @@ class FormTypeExtension extends AbstractTypeExtension
}
}
}

View File

@@ -6,7 +6,7 @@
{% if type == 'text' %}{% set ibo_class='ibo-input-string' %}{% else %}{% set ibo_class='ibo-input-' ~ type %}{% endif %}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' ibo-input ' ~ ibo_class)|trim}) %}
{{- parent() -}}
onChange="this.form.requestSubmit();"
onChange="this.form.requestSubmit();console.log('Auto submitting form due to change in field {{ full_name }}');"
{%- endblock widget_attributes -%}
{%- block form_label -%}