diff options
author | hardythe1 | 2012-02-23 16:30:36 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-23 16:30:36 +0530 |
commit | 9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0 (patch) | |
tree | cac2d9feddb2c5d45f24a806275d23635b528fe9 /testapp/templates/exam/showquestions.html | |
parent | f2d65592affd34bc60cf4a3a2c72de1d84c934c0 (diff) | |
download | online_test-9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0.tar.gz online_test-9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0.tar.bz2 online_test-9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0.zip |
more changes to edit multiple questions at a time
Diffstat (limited to 'testapp/templates/exam/showquestions.html')
-rw-r--r-- | testapp/templates/exam/showquestions.html | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/testapp/templates/exam/showquestions.html b/testapp/templates/exam/showquestions.html index 994ca26..edcba6f 100644 --- a/testapp/templates/exam/showquestions.html +++ b/testapp/templates/exam/showquestions.html @@ -7,7 +7,7 @@ List of Questions {% block script %} <script type='text/javascript'> -function my_confirm(frm) +function confirm_delete(frm) { var r = confirm("Are you Sure ?"); if(r==false) @@ -19,6 +19,18 @@ function my_confirm(frm) location.replace("{{URL_ROOT}}/exam/manage/showquestion"); } } +function confirm_edit(frm) +{ + var n = 0; + for(i=0;i<frm.question.length;i++) + { + if(frm.question[i].checked==true) + n = n+1; + } + if(n==0) + location.replace("{{URL_ROOT}}/exam/manage/showquestion"); + +} </script> {% endblock %} @@ -30,6 +42,8 @@ function my_confirm(frm) {% endfor %} <br> <button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button> -<button class="btn" type="submit" onClick="my_confirm(frm);">Delete</button> +<button class="btn" type="submit" name='edit' value='edit' onClick="confirm_edit(frm);">Edit Selected</button> +<button class="btn" type="submit" onClick="confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button> + </form> {% endblock %} |