mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
Improve rendering of options and fields
This commit is contained in:
@@ -35,17 +35,17 @@
|
||||
{# CFChoice : render the different elements in a choice list #}
|
||||
{% block cf_choices_row %}
|
||||
<h3>{{ 'Choices'|trans }}</h3>
|
||||
{{ dump(form.vars.prototype.children) }}
|
||||
|
||||
<div id="{{ form.vars.id }}" data-prototype="{{- form_row(form.vars.prototype.children.name)
|
||||
~ form_row(form.vars.prototype.children.active)
|
||||
~ form_row(form.vars.prototype.children.slug) |e -}}">
|
||||
~ form_row(form.vars.prototype.children.slug) -}}">
|
||||
<table><tbody>
|
||||
{% for choice in form %}
|
||||
<tr><td>
|
||||
{{ form_row(choice.name) }}
|
||||
{{ form_row(choice.active) }}
|
||||
{{ form_row(choice.slug) }}
|
||||
</td></tr>
|
||||
</td></tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
</div>
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
function initializeCFChoiceOptionsChoices(div_id) {
|
||||
var add_element_link = $('<a id="' + div_id + '_add_element_link"" href="#" class="sc-button bt-submit">Add an element</a>');
|
||||
var add_element_link = $('<a id="' + div_id + '_add_element_link"" href="#" class="sc-button bt-submit">{{ 'Add an element'|trans }}</a>');
|
||||
var div = $('#' + div_id);
|
||||
div.append(add_element_link);
|
||||
div.data('index', div.find(':input').length / 5);
|
||||
|
Reference in New Issue
Block a user