mirror of
https://github.com/Steffo99/estus.git
synced 2024-11-21 15:14:19 +00:00
Tiny improvement to the network add page
This commit is contained in:
parent
81f6b6f742
commit
1b991ce372
2 changed files with 2 additions and 2 deletions
|
@ -740,7 +740,7 @@ def page_net_add():
|
|||
except ValueError:
|
||||
return render_template("error.htm", error="Il campo Subnet deve contenere il numero di bit della subnet. "
|
||||
"(8, 16, 24...)")
|
||||
nuovonet = Rete(nome=request.form["nome"], network_ip=request.form["network_ip"], subnet=request.form["subnet"],
|
||||
nuovonet = Rete(nome=request.form["nome"], network_ip=request.form["network_ip"], subnet=request.form["subnet"].lstrip("/"),
|
||||
primary_dns=request.form["primary_dns"], secondary_dns=request.form["secondary_dns"])
|
||||
db.session.add(nuovonet)
|
||||
db.session.commit()
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<form class="form-inline" {% if net %}action="/net_show/{{ net.nid }}"{% endif %} method="post">
|
||||
<input class="form-control" type="text" placeholder="Nome rete" name="nome" {% if net %}value="{{ net.nome }}"{% endif %}>
|
||||
<input class="form-control" type="text" placeholder="Network IP" name="network_ip" {% if net %}value="{{ net.network_ip }}"{% endif %}>
|
||||
<input class="form-control" type="text" placeholder="Subnet mask" name="subnet" {% if net %}value="{{ net.subnet }}"{% endif %}>
|
||||
<input class="form-control" type="text" placeholder="Subnet mask (/XX)" pattern="/?[0-9]{2}" name="subnet" {% if net %}value="{{ net.subnet }}"{% endif %}>
|
||||
<input class="form-control" type="text" placeholder="DNS primario" name="primary_dns" {% if net %}value="{{ net.primary_dns }}"{% endif %}>
|
||||
<input class="form-control" type="text" placeholder="DNS secondario" name="secondary_dns" {% if net %}value="{{ net.secondary_dns }}"{% endif %}>
|
||||
<input class="btn btn-primary" type="submit">
|
||||
|
|
Loading…
Reference in a new issue