Commit bb56fc6c authored by Arnaud Bey's avatar Arnaud Bey
Browse files

fix patterns form view

parent 38fe6e20
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
<form id="gridpattern" method="POST"> <form id="gridpattern" method="POST">
{{ form_row(form.name) }} {{ form_row(form.name) }}
{{ form_row(form.description) }} {{ form_row(form.description) }}
{{ form_label(form.strings) }} Chaines de caractères:
<span class="btn btn-outline-secondary btn-sm" onclick="gridPatternHandler.addString()" > <span class="btn btn-outline-secondary btn-sm" onclick="gridPatternHandler.addString()" >
<i class="fa fa-plus" aria-hidden="true"></i> <i class="fa fa-plus" aria-hidden="true"></i>
{{ 'add_string' | trans }} {{ 'add_string' | trans }}
</span> </span>
<ul class="list-group row" id="strings" data-prototype="{{ macros.strings_prototype(form.strings.vars.prototype)|e }}"> <ul class="list-group" id="strings" data-prototype="{{ macros.strings_prototype(form.strings.vars.prototype)|e }}">
{% for string in form.strings %} {% for string in form.strings %}
{{ macros.strings_prototype(string) }} {{ macros.strings_prototype(string) }}
{% endfor %} {% endfor %}
...@@ -35,10 +35,16 @@ ...@@ -35,10 +35,16 @@
</form> </form>
{% macro strings_prototype(string) %} {% macro strings_prototype(string) %}
<li class="col-md-6 list-group-item string"> <li class="list-group-item string">
{{ form_widget(string.value) }} <div class="row">
<span onclick="gridPatternHandler.removeString(this);" class="btn btn-danger btn-sm"> <div class="col">
<i class="fa fa-times" aria-hidden="true"></i> <span onclick="gridPatternHandler.removeString(this);" class="btn btn-danger btn-sm">
</span> <i class="fa fa-times" aria-hidden="true"></i>
</span>
</div>
<div class="col-11">
{{ form_widget(string.value) }}
</div>
</div>
</li> </li>
{% endmacro %} {% endmacro %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment