poc form SDK (extends to form)

This commit is contained in:
Benjamin Dalsass
2023-09-05 15:12:48 +02:00
parent 253c61e241
commit 8126233553
12 changed files with 171 additions and 42 deletions

View File

@@ -39,7 +39,7 @@
{# inject form #}
<div>
{{ form(form, {'attr': {'id' : 'object_form'}}) }}
{{ form(form, {'attr': {'id' : 'object_form', 'data-object-id' : id}}) }}
</div>
{% endblock %}
@@ -59,7 +59,7 @@
});
{# Collection #}
const oCollection = new Collection(oForm, '{{ path('object_form', {'class': 'object_class', 'id' : 0, 'name': 'form_name'}) }}');
const oCollection = new Collection(oForm, '{{ path('object_form', {'class': 'object_class', 'id' : 0, 'name': 'form_name'}) }}', '{{ path('object_save', {'class': 'object_class', 'id' : 0, 'name': 'form_name'}) }}');
oCollection.handleElement(document);
{# toast database information #}