42 lines
980 B
HTML
42 lines
980 B
HTML
---
|
|
name:
|
|
type: "string"
|
|
default: ""
|
|
schema:
|
|
type: "hash"
|
|
default_value_types:
|
|
type: "hash"
|
|
default_label_class_by_type:
|
|
type: "hash"
|
|
add:
|
|
type: "hash"
|
|
default:
|
|
es: "Agregar"
|
|
en: "Add"
|
|
ar: "Add"
|
|
remove:
|
|
type: "hash"
|
|
default:
|
|
es: "Quitar"
|
|
en: "Remove"
|
|
ar: "Remove"
|
|
---
|
|
{% capture uuid %}{% uuid %}{% endcapture %}
|
|
{% assign base = name | append: '[' | append: uuid | append: ']' %}
|
|
|
|
<div data-controller="nested-form" data-nested-form-uuid-value="{{ uuid }}">
|
|
<div data-nested-form-target="container"></div>
|
|
|
|
<button data-action="nested-form#add:stop:prevent" class="btn btn-primary">{{ add[locale] }}</button>
|
|
|
|
<template data-nested-form-target="form">
|
|
<div>
|
|
<button data-action="nested-form#del:stop:prevent" class="btn btn-danger">{{ remove[locale] }}</button>
|
|
|
|
{% render 'forms/form_fields.html', schema:, default_value_types:, base:, default_label_class_by_type: %}
|
|
|
|
<hr />
|
|
</div>
|
|
</template>
|
|
</div>
|