mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 08:53:46 +00:00
Utilisation du BFT tag sur les machines dans l'édition d'interface
+Corretion d'une typo sur la génération de la variable choices
This commit is contained in:
parent
a5b89f68ce
commit
5afd1badaa
2 changed files with 11 additions and 3 deletions
|
@ -49,11 +49,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% if interfaceform %}
|
{% if interfaceform %}
|
||||||
<h3>Interface</h3>
|
<h3>Interface</h3>
|
||||||
{% if i_bft_param %}
|
{% if i_bft_param %}
|
||||||
|
{% if 'machine' in interfaceform.fields %}
|
||||||
|
{% bootstrap_form_typeahead interfaceform 'ipv4,machine' bft_param=i_bft_param %}
|
||||||
|
{% else %}
|
||||||
{% bootstrap_form_typeahead interfaceform 'ipv4' bft_param=i_bft_param %}
|
{% bootstrap_form_typeahead interfaceform 'ipv4' bft_param=i_bft_param %}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% if 'machine' in interfaceform.fields %}
|
||||||
|
{% bootstrap_form_typeahead interfaceform 'ipv4,machine' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% bootstrap_form_typeahead interfaceform 'ipv4' %}
|
{% bootstrap_form_typeahead interfaceform 'ipv4' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if domainform %}
|
{% if domainform %}
|
||||||
<h3>Domaine</h3>
|
<h3>Domaine</h3>
|
||||||
{% bootstrap_form domainform %}
|
{% bootstrap_form domainform %}
|
||||||
|
|
|
@ -300,7 +300,7 @@ def default_choices( f_value ) :
|
||||||
""" The JS script creating the variable choices_<fieldname> """
|
""" The JS script creating the variable choices_<fieldname> """
|
||||||
return '[{objects}]'.format(
|
return '[{objects}]'.format(
|
||||||
objects = ','.join(
|
objects = ','.join(
|
||||||
[ '{{ key: {k}, value: "{k}" }}'.format(
|
[ '{{key:{k},value:"{v}"}}'.format(
|
||||||
k = choice[0] if choice[0] != '' else '""',
|
k = choice[0] if choice[0] != '' else '""',
|
||||||
v = choice[1]
|
v = choice[1]
|
||||||
) for choice in f_value.choices ]
|
) for choice in f_value.choices ]
|
||||||
|
|
Loading…
Reference in a new issue