diff options
author | jayparikh111 | 2012-03-13 18:44:01 +0530 |
---|---|---|
committer | jayparikh111 | 2012-03-13 18:44:01 +0530 |
commit | a7c84a478789e9e835dcbb3ea41b1d519ba69b4d (patch) | |
tree | fc879bdd0b0eb58817275c0837126a06be81f96e /testapp/templates/exam/edit_question.html | |
parent | 87862b8c8d7822a4578b5cb5f413bedb37454bd2 (diff) | |
download | online_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.tar.gz online_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.tar.bz2 online_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.zip |
minor changes for UI
Diffstat (limited to 'testapp/templates/exam/edit_question.html')
-rw-r--r-- | testapp/templates/exam/edit_question.html | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/testapp/templates/exam/edit_question.html b/testapp/templates/exam/edit_question.html index a189ac5..b1395e9 100644 --- a/testapp/templates/exam/edit_question.html +++ b/testapp/templates/exam/edit_question.html @@ -15,15 +15,49 @@ function my_render(frm) } } +function load_form() +{ + +} + +function data(showContent,showHideDiv) +{ + var con = document.getElementById(showContent); + var ele=document.getElementById(showHideDiv); + if (ele.style.display=="block") + { + con.style.display = "none" + ele.style.display = "none"; + } + else + { + con.style.display = "block"; + ele.style.display = "block"; + } +} </script> {% endblock %} +{% block onload %} onload='javascript:load_form();' {% endblock %} {% block manage %} <form name='frm' action="{{URL_ROOT}}/exam/manage/editquestion/" method="post" onKeyPress='javascript:my_render(frm);'> {% csrf_token %} - {% for form in forms %} -<b>Look of Question in HTML Format :</b> + {% for form in forms %} + + {{ form.summary.value }}<a onClick="data('contentDiv{{forloop.counter}}','myContent{{forloop.counter}}');" style='cursor:pointer;'>Show</a> <br> + <b>Look of Question in HTML Format :</b> <p id='{{forloop.counter}}'></p> + <div id="contentDiv{{forloop.counter}}"> + <div id="myContent{{forloop.counter}}" style="display: none;"> + <table> {{ form.as_table }} </table> + + </div> + </div> + <hr> + {% endfor %} + + {% for form in forms %} + <table class=span1> {{ form.as_table }} </table> @@ -32,5 +66,7 @@ function my_render(frm) <center><button class="btn" type="submit" name="savequestion">Save</button> <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Cancel</button> </center> </form> + + {% endblock %} |