diff options
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/add_question.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js index 0f02aab..2db5301 100644 --- a/yaksh/static/yaksh/js/add_question.js +++ b/yaksh/static/yaksh/js/add_question.js @@ -73,9 +73,9 @@ function replaceSelection (input, replaceString) function textareaformat() { - document.getElementById('id_type').setAttribute('class','select-type'); + document.getElementById('id_type').setAttribute('class','custom-select'); document.getElementById('id_points').setAttribute('class','mini-text'); - document.getElementById('id_tags').setAttribute('class','tag-text'); + document.getElementById('id_tags').setAttribute('class','form-control'); $("[id*="+'test_case_args'+"]").attr('placeholder', 'Command Line arguments for bash only'); @@ -143,6 +143,13 @@ function textareaformat() $("#id_grade_assignment_upload").prop("disabled", true); } }); + + $('#id_file_field').on('change',function(){ + //get the file name + var fileName = $(this).val(); + //replace the "Choose a file" label + $(this).next('.custom-file-label').html(fileName); + }) } function autosubmit() |