diff options
author | hardythe1 | 2012-02-24 16:16:38 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-24 16:16:38 +0530 |
commit | b1fbf5b02280de5b78b0249e777a179e34b50b98 (patch) | |
tree | f133bd5e556d4d0e8bbc94c9ffbac22bcc46bb31 /testapp/templates/exam/show_quiz.html | |
parent | dd3fd7b8c58d836baba24441e7d55c6d51858eab (diff) | |
download | online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.tar.gz online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.tar.bz2 online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.zip |
formating and identation
Diffstat (limited to 'testapp/templates/exam/show_quiz.html')
-rw-r--r-- | testapp/templates/exam/show_quiz.html | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html index d546b06..e6aecd6 100644 --- a/testapp/templates/exam/show_quiz.html +++ b/testapp/templates/exam/show_quiz.html @@ -3,33 +3,31 @@ {% block title %} Quiz List {% endblock title %} {% block script %} -<script type='text/javascript'> -function my_confirm(frm) -{ - var r = confirm("Are you Sure ?"); - if(r==false) - { + <script type='text/javascript'> + function my_confirm(frm) + { + var r = confirm("Are you Sure ?"); + if(r==false) + { for(i=0;i<frm.quiz.length;i++) { frm.quiz[i].checked=false; } location.replace("{{URL_ROOT}}/exam/manage/showquiz"); - } - -} -function confirm_edit(frm) -{ - var n = 0; - for (var i =0;i<frm.quiz.length;i++) - { + } + } + function confirm_edit(frm) + { + var n = 0; + for (var i =0;i<frm.quiz.length;i++) + { if (frm.quiz[i].checked == false) n = n + 1 ; - } - if(n == frm.quiz.length) + } + if(n == frm.quiz.length) location.replace("{{URL_ROOT}}/exam/manage/showquiz"); -} - -</script> + } + </script> {% endblock %} {% block manage %} @@ -46,13 +44,14 @@ function confirm_edit(frm) {% csrf_token %} {% for quiz in quizzes %} - <input type=checkbox name='quiz' value={{quiz.id}} /> <a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a><br> {% endfor %} + <br><br> <button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz");'>Add New Quiz</button> <button class="btn" type="submit" name='edit' value='edit' onClick="confirm_edit(frm);" >Edit Selected</button> <button class="btn" type="submit" name="delete" value='delete' onClick="my_confirm(frm);">Delete Selected</button> </form> {% endif %} + {% endblock %} |