Removed all inline <script> tags

This commit is contained in:
Raphael Michel
2016-04-10 16:44:49 +02:00
parent eafbe95370
commit 5cca426cd3
16 changed files with 157 additions and 87 deletions

View File

@@ -83,19 +83,4 @@
</button>
</div>
</form>
<script type="text/javascript">
$(function () {
function toggle_view() {
var show = $("#id_type").val() == "C" || $("#id_type").val() == "M";
$("#answer-options").toggle(show);
show = $("#id_type").val() == "B" && $("#id_required").prop("checked");
$(".alert-required-boolean").toggle(show);
}
$("#id_type").change(toggle_view);
$("#id_required").change(toggle_view);
toggle_view();
});
</script>
{% endblock %}