Skip to content

Commit

Permalink
Merge pull request #1385 from guardian/refresh-deploy-info-on-blur-of…
Browse files Browse the repository at this point in the history
…-build

[UI/deploy screen] call `updateDeployInfo()` more reliably to ensure recent deploys and restrictions reflect the choices
  • Loading branch information
twrichards authored Oct 21, 2024
2 parents adbfb3b + 609e509 commit 979728c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions riff-raff/app/assets/javascripts/form-autocomplete.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ updateStageInfo = () ->
stageInput = $('#stage')
stageInput.html(stageOptions)
stageInput.prop('disabled', false)
updateDeployInfo()
});

updateDeployInfo = () ->
Expand Down Expand Up @@ -119,7 +120,7 @@ $ ->
input.on('change', updateFavouriteButton)
input.on('keyup', updateFavouriteButton)

$('#projectInput').blur updateDeployInfo
$('#projectInput').blur -> updateDeployInfo()

$('#buildInput').each ->
input = $(this)
Expand Down Expand Up @@ -154,10 +155,12 @@ $ ->
$('#buildInput').on('input keyup',
->
updateStageInfo()
updateDeployInfo()
)

$('#stage').change ->
updateDeployInfo()
$('#buildInput').blur -> updateDeployInfo()

$('#stage').change -> updateDeployInfo()

updateDeployInfo()

Expand Down

0 comments on commit 979728c

Please sign in to comment.