1
Fork 0
mirror of https://github.com/Steffo99/estus.git synced 2024-11-21 23:24:18 +00:00

Add barcode scan support to /disp_add

This commit is contained in:
Steffo 2017-09-11 16:45:49 +02:00 committed by GitHub
parent bcabb2b83c
commit c659958c77

View file

@ -354,12 +354,13 @@ def page_disp_add():
if 'username' not in session:
return redirect(url_for('page_login'))
if request.method == 'GET':
serial = request.args.get("scanned_barcode")
opzioni = ["Centralino", "Dispositivo generico di rete", "Marcatempo", "PC", "Portatile", "POS", "Router",
"Server", "Stampante di rete", "Switch", "Telefono IP", "Monitor", "Scanner", "Stampante locale"]
impiegati = Impiegato.query.all()
css = url_for("static", filename="style.css")
return render_template("dispositivo/add.htm", css=css, impiegati=impiegati, opzioni=opzioni, type="dev",
user=session["username"])
user=session["username"], serial=serial)
else:
nuovodisp = Dispositivo(request.form['tipo'], request.form['marca'], request.form['modello'],
request.form['inv_ced'], request.form['inv_ente'], request.form['fornitore'])