From 0f6fe210b7e92f8900c2d45b4064e0783deb909f Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Tue, 29 May 2018 15:04:25 -0400 Subject: [PATCH] fix when token scope is passing when the ui saves the form --- .../users/tokens/users-tokens-add.controller.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/awx/ui/client/features/users/tokens/users-tokens-add.controller.js b/awx/ui/client/features/users/tokens/users-tokens-add.controller.js index 1421077b1c..67e15fa0ad 100644 --- a/awx/ui/client/features/users/tokens/users-tokens-add.controller.js +++ b/awx/ui/client/features/users/tokens/users-tokens-add.controller.js @@ -32,9 +32,9 @@ function AddTokensController ( vm.form.scope = { choices: [ - '', - 'read', - 'write' + [null, ''], + ['read', strings.get('add.SCOPE_READ_LABEL')], + ['write', strings.get('add.SCOPE_WRITE_LABEL')] ], help_text: strings.get('add.SCOPE_HELP_TEXT'), id: 'scope', @@ -42,12 +42,12 @@ function AddTokensController ( required: true, _component: 'at-input-select', _data: [ - strings.get('add.SCOPE_PLACEHOLDER'), - strings.get('add.SCOPE_READ_LABEL'), - strings.get('add.SCOPE_WRITE_LABEL') + [null, ''], + ['read', strings.get('add.SCOPE_READ_LABEL')], + ['write', strings.get('add.SCOPE_WRITE_LABEL')] ], - _exp: 'choice for (index, choice) in state._data', - _format: 'array' + _exp: 'choice[1] for (index, choice) in state._data', + _format: 'selectFromOptions' }; vm.form.save = payload => {