8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 09:26:27 +00:00

Formatage et nettoyage du formulaire switch

This commit is contained in:
Gabriel Detraz 2017-10-26 18:54:38 +02:00 committed by root
parent a2e03538e3
commit 5471169827
2 changed files with 6 additions and 1 deletions

View file

@ -125,7 +125,8 @@ class NewSwitchForm(ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(NewSwitchForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['location'].label = 'Localisation'
self.fields['number'].label = 'Nombre de ports'
class EditRoomForm(ModelForm):
"""Permet d'éediter le nom et commentaire d'une prise murale"""

View file

@ -47,12 +47,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<form class="form" method="post">
{% csrf_token %}
{% if topoform %}
<h3>Réglage spécifiques du switch</h3>
{% massive_bootstrap_form topoform 'switch_interface' %}
{% endif %}
{% if machineform %}
<h3>Réglages généraux de la machine associée au switch</h3>
{% massive_bootstrap_form machineform 'user' %}
{% endif %}
{% if interfaceform %}
<h3>Réglages généraux de l'interface associée au switch</h3>
{% if i_mbf_param %}
{% massive_bootstrap_form interfaceform 'ipv4,machine' mbf_param=i_mbf_param %}
{% else %}
@ -60,6 +63,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
{% endif %}
{% if domainform %}
<h3>Nom de la machine</h3>
{% bootstrap_form domainform %}
{% endif %}
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="ok" %}