Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
54711698
Commit
54711698
authored
Oct 26, 2017
by
Gabriel Detraz
Committed by
root
Oct 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatage et nettoyage du formulaire switch
parent
a2e03538
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
topologie/forms.py
topologie/forms.py
+2
-1
topologie/templates/topologie/switch.html
topologie/templates/topologie/switch.html
+4
-0
No files found.
topologie/forms.py
View file @
54711698
...
...
@@ -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"""
...
...
topologie/templates/topologie/switch.html
View file @
54711698
...
...
@@ -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" %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment