Skip to content

Commit

Permalink
Merge pull request #1757 from MeasureAuthoringTool/feature/MAT-2567
Browse files Browse the repository at this point in the history
MAT-2567 Patient Conversion: User has ability to click Submit before selecting the import file
  • Loading branch information
Serhii Ilin committed Jan 28, 2021
2 parents 49ec395 + a9ef108 commit 988dc03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
</div>
<div class="modal-footer">
<button type="submit" id="importPatientsSubmit" class="btn btn-primary">Submit</button>
<button type="submit" id="importPatientsSubmit" class="btn btn-primary" disabled>Submit</button>
<button type="button" id="importPatientsCancel" class="btn btn-default">Cancel</button>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/views/import_patients_view.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Thorax.Views.ImportPatients extends Thorax.Views.BonnieView
@$el.on 'hidden.bs.modal', -> @remove() unless $('#importPatientsDialog').is(':visible')
'click #importPatientsCancel': 'cancel'
'click #importPatientsSubmit': 'submit'
'change #patientFileInput': 'fileChanged'
'ready': 'setup'


Expand All @@ -34,3 +35,6 @@ class Thorax.Views.ImportPatients extends Thorax.Views.BonnieView
$(e.target).prop('disabled', true)
@$('form').submit()
@importPatientsDialog.modal('hide')

fileChanged: (e) ->
@$('#importPatientsSubmit').prop('disabled', !fileName = $(e.target).val())

0 comments on commit 988dc03

Please sign in to comment.