Skip to content

Commit

Permalink
YDA-5266: improve user guidance when generating a data access password
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Aug 2, 2023
1 parent db048c3 commit c5ff3fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions user/static/user/js/data_access.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $(document).ready(function () {
const label = $('#f-token-label').val()

const button = document.getElementById('generateButton')
const token = document.getElementById('tokenField')
button.setAttribute('hidden', true)

Yoda.call('token_delete_expired', {}).then(response => {
Expand All @@ -26,6 +27,7 @@ $(document).ready(function () {
$('#f-token').val(data)
const p = document.getElementById('passwordOk')
p.removeAttribute('hidden')
token.removeAttribute('hidden')
},
(error) => {
let errorId = 'passwordGenerateError'
Expand All @@ -35,6 +37,7 @@ $(document).ready(function () {
const p = document.getElementById(errorId)
p.removeAttribute('hidden')
button.removeAttribute('hidden')
token.setAttribute('hidden', true)
}
)
})
Expand Down
2 changes: 1 addition & 1 deletion user/templates/user/data_access.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h5 class="modal-title" id="dataAccessPassword">Generate new data access passwor
required>
</div>
</div>
<div class="form-group row">
<div id="tokenField" class="form-group row" hidden="">
<label class="col-sm-3 col-form-label" for="f-token">Password</label>
<div class="col-sm-7">
<input
Expand Down

0 comments on commit c5ff3fd

Please sign in to comment.