a
This commit is contained in:
@@ -41,6 +41,10 @@ def submit():
|
||||
value = request.form.get("query")
|
||||
time_value = request.form.get("time")
|
||||
noshutdown = request.form.get("noshutdown")
|
||||
if not noshutdown:
|
||||
noshutdown = 0
|
||||
else:
|
||||
noshutdown = 1
|
||||
if not value or (not time_value or not noshutdown):
|
||||
return redirect(url_for("mainpage"))
|
||||
conn = get_db_connection()
|
||||
|
||||
@@ -13,14 +13,6 @@
|
||||
class="form-control bg-dark text-white"
|
||||
placeholder="Nom de la machine">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-check text-white">
|
||||
<input class="form-check-input" type="checkbox" name="noshutdown" id="noshutdown">
|
||||
<label class="form-check-label" for="noshutdown">
|
||||
Whitelist shutdown
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select name="time" class="form-select bg-dark text-white" id="time-select">
|
||||
{% for hour in range(0, 24) %}
|
||||
@@ -29,7 +21,14 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-check text-white">
|
||||
<input class="form-check-input" type="checkbox" name="noshutdown" id="noshutdown">
|
||||
<label class="form-check-label" for="noshutdown">
|
||||
Whitelist shutdown
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="submit" class="btn btn-secondary">
|
||||
Ajouter
|
||||
|
||||
Reference in New Issue
Block a user