mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-02 01:04:41 +02:00
Use a stimulus controller to implement collectionType for specifications/parameters.
This commit is contained in:
parent
f7ce94c168
commit
537b7fad7f
6 changed files with 153 additions and 91 deletions
18
templates/components/collection_type.macro.html.twig
Normal file
18
templates/components/collection_type.macro.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% macro controller(form, deleteMessage) %}
|
||||
{{ stimulus_controller('elements/collection_type', {
|
||||
'deleteMessage': 'parameter.delete.confirm'|trans,
|
||||
'prototype': form_widget(form.parameters.vars.prototype)|e('html_attr')
|
||||
}) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro target() %}
|
||||
{{ stimulus_target('elements/collection_type', 'target') }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro create_btn() %}
|
||||
{{ stimulus_action('elements/collection_type', 'createElement') }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro delete_btn() %}
|
||||
{{ stimulus_action('elements/collection_type', 'deleteElement') }}
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue