This commit is contained in:
2026-02-20 14:19:27 +00:00
parent c08f81bd03
commit 32dee47628
2 changed files with 12 additions and 9 deletions

View File

@@ -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()

View File

@@ -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