From bf605d1ce6230442bfb31c631b17cb3106114174 Mon Sep 17 00:00:00 2001 From: Montana Date: Tue, 18 Sep 2018 14:05:07 -0400 Subject: [PATCH] Vue function to display the environment role in a friendlier format --- js/components/forms/edit_workspace_member.js | 4 +++- templates/workspaces/members/edit.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/components/forms/edit_workspace_member.js b/js/components/forms/edit_workspace_member.js index 08ea5d14..7b43599e 100644 --- a/js/components/forms/edit_workspace_member.js +++ b/js/components/forms/edit_workspace_member.js @@ -30,7 +30,9 @@ export default { change: function (e) { this.value = e.target.value }, - // method to map ugly name to human readable name here + readableName: function (role) { + return role.replace(/[_]/g, " ") + }, }, mounted: function () { diff --git a/templates/workspaces/members/edit.html b/templates/workspaces/members/edit.html index a8f767e3..4506ce61 100644 --- a/templates/workspaces/members/edit.html +++ b/templates/workspaces/members/edit.html @@ -81,7 +81,7 @@
{{ form.data["environment_role"] }}
- + {% call Modal(name=env.name + 'RolesModal', dismissable=False) %}