diff options
-rw-r--r-- | ogcp/templates/actions/add_center.html | 2 | ||||
-rw-r--r-- | ogcp/templates/actions/add_room.html | 2 | ||||
-rw-r--r-- | ogcp/templates/actions/delete_center.html | 2 | ||||
-rw-r--r-- | ogcp/templates/actions/delete_room.html | 2 | ||||
-rw-r--r-- | ogcp/views.py | 16 |
5 files changed, 16 insertions, 8 deletions
diff --git a/ogcp/templates/actions/add_center.html b/ogcp/templates/actions/add_center.html index 10759c7..59ab450 100644 --- a/ogcp/templates/actions/add_center.html +++ b/ogcp/templates/actions/add_center.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'scopes.html' %} {% import "bootstrap/wtf.html" as wtf %} {% block content %} diff --git a/ogcp/templates/actions/add_room.html b/ogcp/templates/actions/add_room.html index dffdc87..d3ecc8b 100644 --- a/ogcp/templates/actions/add_room.html +++ b/ogcp/templates/actions/add_room.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'scopes.html' %} {% import "bootstrap/wtf.html" as wtf %} {% block content %} diff --git a/ogcp/templates/actions/delete_center.html b/ogcp/templates/actions/delete_center.html index 3a01c93..1a52cdd 100644 --- a/ogcp/templates/actions/delete_center.html +++ b/ogcp/templates/actions/delete_center.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'scopes.html' %} {% import "bootstrap/wtf.html" as wtf %} {% block content %} diff --git a/ogcp/templates/actions/delete_room.html b/ogcp/templates/actions/delete_room.html index a5aa529..1761bb3 100644 --- a/ogcp/templates/actions/delete_room.html +++ b/ogcp/templates/actions/delete_room.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'scopes.html' %} {% import "bootstrap/wtf.html" as wtf %} {% block content %} diff --git a/ogcp/views.py b/ogcp/views.py index d4c74a1..ae67b1e 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -908,7 +908,9 @@ def action_center_add(): flash(_('Center added successfully'), category='info') return redirect(url_for("scopes")) else: - return render_template('actions/add_center.html', form=form) + scopes, clients = get_scopes() + return render_template('actions/add_center.html', form=form, + scopes=scopes) @app.route('/action/center/delete', methods=['GET', 'POST']) @login_required @@ -928,7 +930,9 @@ def action_center_delete(): centers = parse_scopes_from_tree(r.json(), 'center') centers = [(center['id'], center['name']) for center in centers] form.center.choices = list(centers) - return render_template('actions/delete_center.html', form=form) + scopes, clients = get_scopes() + return render_template('actions/delete_center.html', form=form, + scopes=scopes) @app.route('/action/room/add', methods=['GET', 'POST']) @login_required @@ -949,7 +953,9 @@ def action_room_add(): centers = parse_scopes_from_tree(r.json(), 'center') centers = [(center['id'], center['name']) for center in centers] form.center.choices = list(centers) - return render_template('actions/add_room.html', form=form) + scopes, clients = get_scopes() + return render_template('actions/add_room.html', form=form, + scopes=scopes) @app.route('/action/room/delete', methods=['GET', 'POST']) @login_required @@ -970,7 +976,9 @@ def action_room_delete(): rooms = [(room['id'], room['name'] + " (" + room['parent'] + ")") for room in rooms] form.room.choices = list(rooms) - return render_template('actions/delete_room.html', form=form) + scopes, clients = get_scopes() + return render_template('actions/delete_room.html', form=form, + scopes=scopes) @app.route('/commands/', methods=['GET']) @login_required |