diff --git a/server.py b/server.py index 3d99fff..a4cbffc 100644 --- a/server.py +++ b/server.py @@ -392,7 +392,7 @@ def page_imp_add(): return abort(403) if request.method == 'GET': servizi = Servizio.query.join(Ente).order_by(Ente.nomeente, Servizio.nomeservizio).all() - return render_template("impiegato/add.htm", servizi=servizi, pagetype="imp", user=session.get("username")) + return render_template("impiegato/show.htm", action="add", servizi=servizi, pagetype="imp", user=session.get("username")) else: nuovoimp = Impiegato(request.form['sid'], request.form['nomeimpiegato'], request.form['username'], request.form['passwd'],) @@ -438,7 +438,7 @@ def page_imp_show(iid): if request.method == "GET": imp = Impiegato.query.get_or_404(iid) servizi = Servizio.query.all() - return render_template("impiegato/show.htm", imp=imp, servizi=servizi, user=session.get("username")) + return render_template("impiegato/show.htm", action="show", imp=imp, servizi=servizi, user=session.get("username")) else: imp = Impiegato.query.get_or_404(iid) imp.sid = request.form["sid"] diff --git a/templates/impiegato/add.htm b/templates/impiegato/add.htm deleted file mode 100644 index 4ea8b59..0000000 --- a/templates/impiegato/add.htm +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.htm" %} -{% block title %}Aggiungi impiegato • estus{% endblock %} -{% block content %} -