-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable file upload submit button until a file has been selected
- Loading branch information
1 parent
f64c5f4
commit 14d2521
Showing
9 changed files
with
42 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,4 +147,7 @@ form.thesis-form { | |
.form-check { | ||
clear: both; | ||
} | ||
} | ||
.navbar { | ||
margin-bottom: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
$('#file_upload_modal_container').remove(); | ||
$('body').append('<div id="file_upload_modal_container"></div>'); | ||
$('#file_upload_modal_container').append('<%= j render "file_upload_modal" %>'); | ||
new bootstrap.Modal(document.getElementById('file_upload_modal'), { | ||
backdrop: 'static' | ||
}).show(); | ||
new bootstrap.Modal(document.getElementById('file_upload_modal')).show(); | ||
$('form.file-upload input.file').change ( function() { | ||
if ($(this).val()) { | ||
$(this).parents('form:first').find('input:submit').removeAttr('disabled'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
$('#file_upload_modal_container').remove(); | ||
$('body').append('<div id="file_upload_modal_container"></div>'); | ||
$('#file_upload_modal_container').append('<%= j render "file_upload_modal" %>'); | ||
new bootstrap.Modal(document.getElementById('file_upload_modal'), { | ||
backdrop: 'static' | ||
}).show(); | ||
new bootstrap.Modal(document.getElementById('file_upload_modal')).show(); | ||
$('form.file-upload input.file').change ( function() { | ||
if ($(this).val()) { | ||
$(this).parents('form:first').find('input:submit').removeAttr('disabled'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters