From c3da34e7cbae4b2c8b2f4422bca3b07d00808233 Mon Sep 17 00:00:00 2001 From: Montana Date: Tue, 11 Sep 2018 16:41:37 -0400 Subject: [PATCH] Capture environment role from modal --- atst/routes/workspaces.py | 2 ++ templates/components/modal.html | 4 ++-- templates/workspaces/members/edit.html | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/atst/routes/workspaces.py b/atst/routes/workspaces.py index 0dca879b..5319474c 100644 --- a/atst/routes/workspaces.py +++ b/atst/routes/workspaces.py @@ -241,6 +241,8 @@ def update_member(workspace_id, member_id): g.current_user, workspace, member, form.data["workspace_role"] ) new_role_name = member.role_displayname + if form.data["environment_role"]: + print (form.data) return redirect( url_for( diff --git a/templates/components/modal.html b/templates/components/modal.html index 970b444d..4efccb8a 100644 --- a/templates/components/modal.html +++ b/templates/components/modal.html @@ -1,7 +1,7 @@ {% from "components/icon.html" import Icon %} {% macro Modal(name, dismissable=False) -%} - + {%- endmacro %} diff --git a/templates/workspaces/members/edit.html b/templates/workspaces/members/edit.html index dc592b9c..e4c89a98 100644 --- a/templates/workspaces/members/edit.html +++ b/templates/workspaces/members/edit.html @@ -62,8 +62,8 @@ name='environment_role' type='radio' id="environment_role_{{ choice[0] }}" - value='choice[0]' - checked='value is choice[0]' + value='{{ choice[0] }}' + checked='{{ value == choice[0] }}' />