|
a |
|
b/OSSEval/IMDBMovieApp/templates/IMDBMovieApp/search.html |
|
|
1 |
<!--
|
|
|
2 |
# This Source Code Form of OSSEval is subject to the terms of the GNU AFFERO
|
|
|
3 |
# GENERAL PUBLIC LICENSE, v. 3.0. If a copy of the AGPL was not
|
|
|
4 |
# distributed with this file, You can obtain one at http://www.gnu.org/licenses/agpl.txt
|
|
|
5 |
#
|
|
|
6 |
# OSSeval is powered by the SOS Open Source AGPL edition.
|
|
|
7 |
# The AGPL requires that you do not remove the SOS Open Source attribution and copyright
|
|
|
8 |
# notices from the user interface (see section 5.d below).
|
|
|
9 |
|
|
|
10 |
# OSSEval Copyright 2014 Bitergium SLL
|
|
|
11 |
# SOS Open Source Copyright 2012 Roberto Galoppini
|
|
|
12 |
# Author: Davide Galletti
|
|
|
13 |
-->
|
|
|
14 |
|
|
|
15 |
{% load staticfiles %}
|
|
|
16 |
|
|
|
17 |
<form id="searchForm" action="{% url 'imdb_movie_search_html' %}" method="post">{% csrf_token %}
|
|
|
18 |
{{ form.as_p }}
|
|
|
19 |
<input type="submit" value="Search" />
|
|
|
20 |
</form>
|
|
|
21 |
<script type="text/javascript">
|
|
|
22 |
var w='<img src="{% static "images/wait1.gif" %}">';
|
|
|
23 |
var options = {
|
|
|
24 |
dataType: 'html',
|
|
|
25 |
beforeSubmit: function() {$("div#search_results").html(w);},
|
|
|
26 |
success: function(data) {
|
|
|
27 |
$('div#search_results').html('<table id="tableSearchResults">' + data + '</table>');
|
|
|
28 |
$('#tableSearchResults').dataTable();
|
|
|
29 |
},
|
|
|
30 |
error: function (data) {alert("Error");}
|
|
|
31 |
};
|
|
|
32 |
$("div#search").tabs();
|
|
|
33 |
$("form#searchForm").ajaxForm(options);
|
|
|
34 |
</script>
|
|
|
35 |
|