{% extends "util/form.html.twig" %}
{% block head_css %}
<link href="{{ asset("/css/jquery-ui.min.css") }}" rel="stylesheet" type="text/css" />
<style>.w-number { width: 100px; }</style>
{% endblock %}
{% block head_js %}
<script type="application/javascript" src="{{ asset("/js/jquery-ui.min.js") }}"></script>
<script type="text/javascript">
function add(elem)
{
// Variable declaration
let alias, count, entity, properties, prototype, value;
// Get the type of the prototype
let type = $(elem).data("type");
// Get the input that contains the entity alias
let entityAlias = $("#entity-alias");
// Get the input that contains the entity name
let entityName = $("#entity-name");
// Get the input that contains the property name
let propertyName = $("#property-name");
// When the user add a new entity
if (type === "entity") {
// Get the values that will be replaced
count = 0;
alias = entityAlias.val();
entity = entityName.val();
value = propertyName.val();
// Get the element witch the prototype will be appended
properties = $('#entities > tbody');
// Get the entity prototype
prototype = $("#prototype-entity");
// From new entities we need to add the modal for the joins
let modalJoins = $($("#prototype-entity-joins")
.clone()
.html()
.replace(/__alias__/g, alias)
.replace(/prototype-join-column/g, "joins-" + alias));
// At this point we don't have any join, so we remove the prototype table
$(modalJoins).find("table").remove();
// Add the modal to the form
$("#modals").append(modalJoins);
} else if (type === "property") { // When the user add a new property
// Get the values that will be replaced
alias = $(elem).data("self");
count = $(elem).data("count");
value = propertyName.val();
// Get the element witch the prototype will be appended
properties = $('#{0}'.format(alias));
// Get the property prototype
prototype = $("#properties-prototype");
// Update the count in add property button
$('button[data-self="{0}"]'.format(alias)).data("count", count + 1);
} else if (type === "join-column") { // When the user add a new join column
// Get the values that will be replaced
alias = $(elem).data("self");
count = $(elem).data("count");
value = $(elem).data("value");
// Get the element witch the prototype will be appended
properties = $($(elem).data("father")).find("tbody");
// Get the property prototype
prototype = $("#prototype-join-column").find("tbody");
} else {
return; // Probability this won't happen
}
if (type === "entity" || type === "property") {
// From new entities we need to add the modal for the property additional information
let modalPrototype = $("#prototype-entity-modal")
.clone()
.html()
.replace(/__alias__/g, alias)
.replace(/__name__/g, count)
.replace(/__value__/g, propertyName.val())
.replace(/disabled="disabled"/g, "");
// Add the modal to the form
$("#modals").append(modalPrototype);
}
prototype = prototype
.clone() // Clone the prototype to maintain the original prototype
.html() // Get only elements inside the prototype element
// Apply the needed replaces
.replace("properties-prototype", alias)
.replace(/__alias__/g, alias)
.replace(/__name__/g, count)
.replace(/__value__/g, value)
.replace(/__entity__/g, entity)
// Remove the disabled property from fields
.replace(/disabled="disabled"/g, "");
// Append the new element to the chosen element
properties.append($(prototype));
// Update the counter
$(elem).data("count", count + 1);
// Reset the fields
entityAlias.val("");
entityName.val("");
propertyName.val("");
// Close the modal
$("#button-close-modal").click();
}
function addJoin(value, alias, selector)
{
// Variables declaration
let prototype;
// Check if the join already exist
if ($(selector).length === 0) {
// Get prototype for the join table
prototype = $("#prototype-join-column")
.clone()
.html()
.replace(/__alias__/g, alias)
.replace(/__value__/g, value)
.replace(/__name__/g, 0)
.replace(/disabled="disabled"/g, "");
// Append the table in the join modal body
$("#joins-" + alias).append(prototype);
return true;
}
return false;
}
function checkForm()
{
let alias, aux, column, count = 0, entities, index, join, prop, result, temp;
entities = $('td > [data-self][type="number"]');
for (aux of entities) {
index = 0;
prop = $('td > [data-father="{0}"][type="number"]'.format($(aux).val(count++).data("self")));
for (temp of prop) { $(temp).val(index++); }
}
result = true;
for (aux of $("#entities * table > tbody")) {
alias = aux.id;
for (temp of $(aux).find("select")) {
column = $(temp).parent().prev().find("input").val();
join = "#join-{0}-{1}".format(alias, column);
if ($(temp).val() === "entity") {
result = result && (!addJoin(column, alias, join));
} else {
remove(join);
}
for (prop of $(join).find("input:not([hidden])")) {
if ($(prop).val() === "") {
result = false;
break;
}
}
}
if (!result) {
$('span[data-self="{0}"]'.format(aux.id)).click();
break;
}
}
if (result) { $("#prototypes").remove(); }
return result;
}
function checkJoins(elem)
{
let alias, column, join, select;
alias = $(elem).data("self");
for (select of $("#" + alias).find("select")) {
column = $(select).parent().prev().find("input").val();
join = "#join-{0}-{1}".format(alias, column);
($(select).val() === "entity") ? addJoin(column, alias, join) : remove(join);
}
}
function remove(selector)
{ $(selector).remove(); }
function self_init()
{
$("#{{ form.actions.vars.id }}").selectize({
labelField: "name",
searchField: ["id", "name"],
sortField: "name",
valueField: "id"
});
$("tbody").sortable();
}
function showEntity()
{
$('[data-type="property"]').removeAttr("hidden");
$('[data-type="entity"]').removeAttr("hidden");
$("#button-add-prop").data("type", "entity");
}
function showProp(elem)
{
$('[data-type="entity"]').attr("hidden", true);
$('[data-type="property"]').removeAttr("hidden");
$("#button-add-prop")
.data("count", $(elem).data("count"))
.data("self", $(elem).data("self"))
.data("type", "property");
}
$(document).ready(function () { self_init(); form_init(); });
</script>
{% endblock %}
{% block form %}
{{ form_start(form) }}
<div class="row mb-2 mx-auto">
<div class="col">
{{ form_widget(form.close) }}
</div>
<div class="col">
<button class="btn-primary form-control" data-bs-toggle="modal" data-bs-target="#modal-add-property" onclick="showEntity()" type="button">{{ "label.addEntity"|trans }}</button>
</div>
<div class="col">
{{ form_widget(form.save) }}
</div>
</div>
{{ form_row(form.namespace) }}
{{ form_row(form.platform) }}
{{ form_row(form.actions) }}
{{ form_row(form.alterFile) }}
{{ form_row(form.invert) }}
{{ form_row(form.test) }}
<div class="container">
<table id="entities" class="bg-light mb-5 table table-bordered text-center w-100">
<thead class="bg-light">
<tr>
<th colspan="13">{{ "label.entity"|trans }}</th>
</tr>
<tr>
<th>{{ "label.name"|trans }}</th>
<th>{{ "label.type"|trans }}</th>
<th class="text-truncate">{{ "label.isId"|trans }}</th>
<th>{{ "label.unique.constraint"|trans }}</th>
<th class="text-truncate">{{ "label.nullable"|trans }}</th>
<th class="text-truncate">{{ "label.insertable"|trans }}</th>
<th class="text-truncate">{{ "label.updatable"|trans }}</th>
<th class="text-truncate">{{ "label.generated"|trans }}</th>
<th>{{ "label.length"|trans }}</th>
<th>{{ "label.precision"|trans }}</th>
<th>{{ "label.scale"|trans }}</th>
<th colspan="2">{{ "label.actions"|trans }}</th>
</tr>
</thead>
<tbody>
{% for alias, entity in entities %}
<tr id="entity-{{ alias }}">
<td colspan="13">
<table class="align-middle mb-0 table table-bordered table-striped w-100">
<thead>
<tr id="{{ form.entity[alias].vars.id }}" class="bg-success bg-opacity-10">
<th><span class="material-icons px-2" role="button">unfold_more</span></th>
<th class="text-start" colspan="2">{{ entity.name }} [{{ alias }}]</th>
<td><span class="align-middle material-icons" data-bs-toggle="modal" data-bs-target="#modal-{{ form.entity[alias].joins.vars.id }}" data-self="{{ alias }}" onclick="checkJoins(this)" role="button">info</span></td>
<td colspan="5">
<button class="btn btn-primary px-3 py-0" data-count="{{ form.entity[alias].properties|length }}" data-bs-toggle="modal" data-bs-target="#modal-add-property" data-self="{{ alias }}" onclick="showProp(this)" type="button">{{ "label.addProperty"|trans }}</button>
</td>
<td colspan="2">
{{ form_widget(form.entity[alias].logger) }} <label for="{{ form.entity[alias].logger.vars.id }}">{{ "label.logger"|trans }}</label>
</td>
<td colspan="2">
{{ form_widget(form.entity[alias].generate) }} <label for="{{ form.entity[alias].generate.vars.id }}">{{ "label.generate"|trans }}</label>
{{ form_widget(form.entity[alias].name, {attr: {"data-self": alias, hidden: true}}) }}
{{ form_widget(form.entity[alias].order, {attr: {"data-self": alias}}) }}
</td>
<td>
<span class="align-middle material-icons" role="button" onclick="remove('#entity-{{ alias }}')">delete</span>
</td>
</tr>
</thead>
<tbody id="{{ alias }}">
{% for index in range(0, entity.properties|length - 1) %}
<tr id="{{ form.entity[alias].properties[index].vars.id }}" data-father="{{ alias }}">
<td>
<span class="material-icons px-2" role="button">unfold_more</span>
{{ form_widget(form.entity[alias].properties[index].order, {attr: {"data-father": alias}}) }}
</td>
<td>{{ form_widget(form.entity[alias].properties[index].name) }}</td>
<td>{{ form_widget(form.entity[alias].properties[index].type) }}</td>
<td class="px-2">
<label for="{{ form.entity[alias].properties[index].id.vars.id }}">{{ "label.isId"|trans }}</label>
{{ form_widget(form.entity[alias].properties[index].id) }}
</td>
<td>{{ form_widget(form.entity[alias].properties[index].unique) }}</td>
<td class="px-2">
<label for="{{ form.entity[alias].properties[index].nullable.vars.id }}">{{ "label.nullable.sort"|trans}}</label>
{{ form_widget(form.entity[alias].properties[index].nullable) }}
<td class="px-2">
<label for="{{ form.entity[alias].properties[index].insertable.vars.id }}">{{ "label.insertable.sort"|trans}}</label>
{{ form_widget(form.entity[alias].properties[index].insertable) }}
<td class="px-2">
<label for="{{ form.entity[alias].properties[index].updatable.vars.id }}">{{ "label.updatable.sort"|trans}}</label>
{{ form_widget(form.entity[alias].properties[index].updatable) }}
<td class="px-2">
<label for="{{ form.entity[alias].properties[index].generated.vars.id }}">{{ "label.generated.sort"|trans}}</label>
{{ form_widget(form.entity[alias].properties[index].generated) }}
</td>
<td class="w-number">{{ form_widget(form.entity[alias].properties[index].length) }}</td>
<td class="w-number">{{ form_widget(form.entity[alias].properties[index].precision) }}</td>
<td class="w-number">{{ form_widget(form.entity[alias].properties[index].scale) }}</td>
<td><span class="align-middle material-icons" data-bs-toggle="modal" data-bs-target="#modal-{{ form.entity[alias].properties[index].vars.id }}" role="button">info</span></td>
<td><span class="align-middle material-icons" role="button" onclick="remove('#{{ form.entity[alias].properties[index].vars.id }}')">delete</span></td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div id="modals">
{% for alias, entity in entities %}
{% for index in range(0, entity.properties|length - 1) %}
<div class="modal" id="modal-{{ form.entity[alias].properties[index].vars.id }}" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ alias }}.{{ form.entity[alias].properties[index].name.vars.value }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container">
<div class="row mb-2 mx-auto">
<div class="col-3">
<label class="form-control bg-dark text-center text-light" for="{{ form.entity[alias].properties[index].columnDefinition.vars.id }}">{{ "label.columnDefinition"|trans }}</label>
</div>
<div class="col-9">
{{ form_widget(form.entity[alias].properties[index].columnDefinition) }}
</div>
</div>
<div class="row mb-2 mx-auto">
<div class="col-3">
<label class="form-control bg-dark text-center text-light" for="{{ form.entity[alias].properties[index].externalAlias.vars.id }}">{{ "label.externalAlias"|trans }}</label>
</div>
<div class="col-9">
{{ form_widget(form.entity[alias].properties[index].externalAlias) }}
</div>
</div>
</div>
{{ form_widget(form.entity[alias].properties[index].options) }}
</div>
</div>
</div>
</div>
{% endfor %}
<div class="modal" id="modal-{{ form.entity[alias].joins.vars.id }}" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ alias }}.{{ form.entity[alias].joins.vars.name }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="joins-{{ alias }}" class="modal-body">
{% for join in form.entity[alias].joins %}
<table id="join-{{ alias }}-{{ join.vars.name }}" class="table table-bordered table-striped w-100">
<thead>
<tr>
<th class="text-center" colspan="11">{{ join.vars.name }}</th>
<th class="text-center"><span class="align-middle material-icons" role="button" onclick="remove('#join-{{ alias }}-{{ join.vars.name }}')">delete</span></th>
</tr>
<tr>
<td class="align-middle text-center" rowspan="2">#</td>
<th class="align-middle text-center" colspan="5">{{ "label.targetEntity"|trans }}</th>
<th colspan="5">
{{ form_widget(join.targetEntity) }}
</th>
<th>
<button class="btn btn-primary w-100" data-count="{{ join.columns|length }}" data-father="#join-{{ alias }}-{{ join.vars.name }}" data-self="{{ alias }}" data-type="join-column" data-value="{{ join.vars.name }}" onclick="add(this)" type="button">+</button>
</th>
</tr>
<tr>
<td class="align-middle text-center" colspan="5">{{ "label.localColumnName"|trans }}</td>
<td class="align-middle text-center" colspan="6">{{ "label.referencedColumnName"|trans }}</td>
</tr>
</thead>
<tbody>
{% for column in join.columns %}
<tr id="{{ column.vars.id }}">
<td class="align-middle text-center">{{ column.vars.name }}</td>
<td colspan="5">
{{ form_widget(column.localColumnName) }}
</td>
<td colspan="5">
{{ form_widget(column.referencedColumnName) }}
</td>
<td>
<button class="btn btn-danger w-100" data-count="{{ join.columns|length }}" data-father="#join-{{ alias }}-{{ join.vars.name }}" data-self="{{ alias }}" data-type="join-column" data-value="{{ join.vars.name }}" onclick="remove('#{{ column.vars.id }}')" type="button">-</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div id="prototypes" hidden="hidden">
<table>
<tbody id="prototype-entity">
<tr>
<td colspan="13">
<table class="align-middle mb-0 table table-bordered table-striped w-100">
<thead>
<tr id="{{ form.entity.vars.prototype.vars.id }}" class="bg-success bg-opacity-10">
<th><span class="material-icons px-2" role="button">unfold_more</span></th>
<th class="text-start" colspan="2">__entity__ [__alias__]</th>
<td><span class="align-middle material-icons" data-bs-toggle="modal" data-bs-target="#modal-{{ form.entity.vars.prototype.joins.vars.id }}" data-self="__alias__" onclick="checkJoins(this)" role="button">info</span></td>
<td colspan="5">
<button class="btn btn-primary px-3 py-0" data-count="1" data-bs-toggle="modal" data-bs-target="#modal-add-property" data-self="__alias__" onclick="showProp(this)" type="button">{{ "label.addProperty"|trans }}</button>
</td>
<td colspan="3">
{{ form_widget(form.entity.vars.prototype.logger) }} <label for="{{ form.entity.vars.prototype.logger.vars.id }}">{{ "label.logger"|trans }}</label>
</td>
<td colspan="2">
{{ form_widget(form.entity.vars.prototype.generate) }} <label for="{{ form.entity.vars.prototype.generate.vars.id }}">{{ "label.generate"|trans }}</label>
{{ form_widget(form.entity.vars.prototype.name, {attr: {"data-self": "__alias__", hidden: true, value: "__entity__"}}) }}
{{ form_widget(form.entity.vars.prototype.order, {attr: {"data-self": "__alias__"}}) }}
</td>
</tr>
</thead>
<tbody id="properties-prototype">
<tr id="{{ form.entity.vars.prototype.properties.vars.prototype.vars.id }}" data-father="__alias__">
<td>
<span class="material-icons px-2" role="button">unfold_more</span>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.order, {attr: {"data-father": "__alias__"}}) }}
</td>
<td>{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.name, {attr: {disabled: true, value: "__value__"}}) }}</td>
<td>{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.type, {attr: {disabled: true}}) }}</td>
<td class="px-2">
<label for="{{ form.entity.vars.prototype.properties.vars.prototype.nullable.vars.id }}">{{ "label.isId"|trans }}</label>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.id) }}
</td>
<td>{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.unique) }}</td>
<td class="px-2">
<label for="{{ form.entity.vars.prototype.properties.vars.prototype.nullable.vars.id }}">{{ "label.nullable.sort"|trans}}</label>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.nullable) }}
<td class="px-2">
<label for="{{ form.entity.vars.prototype.properties.vars.prototype.insertable.vars.id }}">{{ "label.insertable.sort"|trans}}</label>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.insertable) }}
<td class="px-2">
<label for="{{ form.entity.vars.prototype.properties.vars.prototype.updatable.vars.id }}">{{ "label.updatable.sort"|trans}}</label>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.updatable) }}
<td class="px-2">
<label for="{{ form.entity.vars.prototype.properties.vars.prototype.generated.vars.id }}">{{ "label.generated.sort"|trans}}</label>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.generated) }}
</td>
<td class="w-number">{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.length) }}</td>
<td class="w-number">{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.precision) }}</td>
<td class="w-number">{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.scale) }}</td>
<td><span class="align-middle material-icons" data-bs-toggle="modal" data-bs-target="#modal-{{ form.entity.vars.prototype.properties.vars.prototype.vars.id }}" role="button">info</span></td>
<td><span class="align-middle material-icons" role="button" onclick="remove('#{{ form.entity.vars.prototype.properties.vars.prototype.vars.id }}')">delete</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div id="prototype-entity-modal" hidden="hidden">
<div id="modal-{{ form.entity.vars.prototype.properties.vars.id }}___name__" class="modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">__alias__.__value__</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container">
<div class="row mb-2 mx-auto">
<div class="col-3">
<label class="form-control bg-dark text-center text-light" for="{{ form.entity.vars.prototype.properties.vars.prototype.columnDefinition.vars.id }}___name__">{{ "label.columnDefinition"|trans }}</label>
</div>
<div class="col-9">
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.columnDefinition, {attr: {"disabled": true}}) }}
</div>
</div>
</div>
{{ form_widget(form.entity.vars.prototype.properties.vars.prototype.options, {attr: {"disabled": true}}) }}
</div>
</div>
</div>
</div>
</div>
<div id="prototype-entity-joins">
<div id="modal-{{ form.entity.vars.prototype.joins.vars.id }}" class="modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">__alias__.joins</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="prototype-join-column" class="modal-body">
<table id="join-__alias__-__value__" class="table table-bordered table-striped w-100">
<thead>
<tr>
<th class="text-center" colspan="11">__value__</th>
<th class="text-center"><span class="align-middle material-icons" role="button" onclick="remove('#join-__alias__-__value__')">delete</span></th>
</tr>
<tr>
<th class="align-middle text-center" rowspan="2">#</th>
<th class="align-middle text-center" colspan="5">{{ "label.targetEntity"|trans }}</th>
<th colspan="5">
{{ form_widget(form.entity.vars.prototype.joins.vars.prototype.targetEntity, {attr: {disabled: true}}) }}
</th>
<th>
<button class="btn btn-primary w-100" data-count="1" data-father="#join-__alias__-__value__" data-self="__alias__" data-type="join-column" data-value="__value__" onclick="add(this)" type="button">+</button>
</th>
</tr>
<tr>
<td class="align-middle text-center" colspan="5">{{ "label.localColumnName"|trans }}</td>
<td class="align-middle text-center" colspan="6">{{ "label.referencedColumnName"|trans }}</td>
</tr>
</thead>
<tbody>
<tr id="{{ form.entity.vars.prototype.joins.vars.prototype.columns.vars.id }}___name__">
<td class="align-middle text-center">__name__</td>
<td colspan="5">
{{ form_widget(form.entity.vars.prototype.joins.vars.prototype.columns.vars.prototype.localColumnName, {attr: {disabled: true}}) }}
</td>
<td colspan="5">
{{ form_widget(form.entity.vars.prototype.joins.vars.prototype.columns.vars.prototype.referencedColumnName, {attr: {disabled: true}}) }}
</td>
<td>
<button class="btn btn-danger w-100" data-count="1" data-father="#join-__alias__-__value__" data-self="__alias__" data-type="join-column" data-value="__value__" onclick="remove('#{{ form.entity.vars.prototype.joins.vars.prototype.columns.vars.id }}___name__')" type="button">-</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="modal-add-property" class="modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ "label.addProperty"|trans }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row mb-2 mx-auto" data-type="entity" hidden="hidden">
<div class="col-3">
<label class="form-control bg-dark text-light text-center" for="entity-alias">{{ "label.alias"|trans }}</label>
</div>
<div class="col-9">
<input id="entity-alias" class="form-control" type="text" />
</div>
</div>
<div class="row mb-2 mx-auto" data-type="entity" hidden="hidden">
<div class="col-3">
<label class="form-control bg-dark text-light text-center" for="entity-name">{{ "label.entity"|trans }}</label>
</div>
<div class="col-9">
<input id="entity-name" class="form-control" type="text" />
</div>
</div>
<div class="row mb-2 mx-auto" data-type="property" hidden="hidden">
<div class="col-3">
<label class="form-control bg-dark text-light text-center" for="property-name">{{ "label.property.name"|trans }}</label>
</div>
<div class="col-9">
<input id="property-name" class="form-control" type="text" />
</div>
</div>
</div>
<div class="modal-footer">
<button id="button-close-modal" type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ "button.close"|trans }}</button>
<button id="button-add-prop" type="button" class="btn btn-success" data-self="" onclick="add(this)">{{ "button.save"|trans }}</button>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}