diff options
author | CruiseDevice | 2020-01-06 01:10:58 +0530 |
---|---|---|
committer | CruiseDevice | 2020-01-06 01:10:58 +0530 |
commit | 68aab21a767de33e9a798ca847bc788d7429507d (patch) | |
tree | 52bf204620a685fa4a331f57a5e06c8a596607b4 /yaksh/static | |
parent | 0a74cf7b9f60cb5acafd5654d0543bbbbf26574f (diff) | |
download | online_test-68aab21a767de33e9a798ca847bc788d7429507d.tar.gz online_test-68aab21a767de33e9a798ca847bc788d7429507d.tar.bz2 online_test-68aab21a767de33e9a798ca847bc788d7429507d.zip |
Improve UI in addquestion template
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() |