From cc33995ced30682f784577a3227e4f91d4371104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Fri, 6 Oct 2017 23:19:26 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20:=20Ne=20pas=20casser=20le=20formulaire?= =?UTF-8?q?=20si=20des=20champs=20ne=20sont=20pas=20sp=C3=A9cifi=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vérifie la présence des champs de customistion du tag et agit en conséquence. --- machines/templates/machines/machine.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/machines/templates/machines/machine.html b/machines/templates/machines/machine.html index 1b8646ea..5e90447e 100644 --- a/machines/templates/machines/machine.html +++ b/machines/templates/machines/machine.html @@ -45,7 +45,19 @@ with this program; if not, write to the Free Software Foundation, Inc., {% bootstrap_form machineform %} {% endif %} {% if interfaceform %} + {% if i_choices %} + {% if i_match_func %} + {% bootstrap_form_typeahead interfaceform 'ipv4' choices=i_choices match_func=i_match_func %} + {% else %} + {% bootstrap_form_typeahead interfaceform 'ipv4' choices=i_choices %} + {% endif %} + {% else %} + {% if i_match_func %} + {% bootstrap_form_typeahead interfaceform 'ipv4' match_func=i_match_func %} + {% else %} {% bootstrap_form_typeahead interfaceform 'ipv4' %} + {% endif %} + {% endif %} {% endif %} {% if domainform %} {% bootstrap_form domainform %}