{% extends "base.html" %} 
{% block content %}
	<div class="container">
		<div class="text-center">
			<h1>{{ header_text }}</h1>
		</div>
		{%from "_formhelpers.html" import render_field %}
		<form action="{{ url_for( 'select_' + endpoint + '_movie') }}" method="post" name="searchmovie">
			{{ search_form.hidden_tag() }}
	        <div class="input-group">
			{{ render_field(search_form.search,label_visible=false,message=False,placeholder="Fast and furious 7, Les Tuche") }} 
		    <div class="input-group-btn">
			{{ search_form.submit_search(class="btn btn-success center-block") }}	
		    </div>
		</div>
			
		</form>
		<div id="container_overlay">
			<div id="spinner" class="spinner"/>
		</div>
        </div>
	<script type="text/javascript">
		$(document).ready(function(){
		    $("form input[type=submit]").click(function() {
   		    	$(":text").prop("readonly", true);
   		    	$(":submit").prop("disabled", true);
		        $('#container_overlay').show();	
		    });
		});
	</script>
{% endblock %}

{% extends "base.html" %} 
{% block content %}
	<div class="container">
		<div class="text-center">
			<h1>{{ header_text }}</h1>
		</div>
		{%from "_formhelpers.html" import render_field %}
		<form action="{{ url_for( 'select_' + endpoint + '_movie') }}" method="post" name="searchmovie">
			{{ search_form.hidden_tag() }}
	        <div class="input-group">
			{{ render_field(search_form.search,label_visible=false,message=False,placeholder="Fast and furious 7, Les Tuche") }} 
		    <div class="input-group-btn">
			{{ search_form.submit_search(class="btn btn-success center-block") }}	
		    </div>
		</div>
			
		</form>
		<div id="container_overlay">
			<div id="spinner" class="spinner"/>
		</div>
        </div>
	<script type="text/javascript">
		$(document).ready(function(){
		    $("form input[type=submit]").click(function() {
   		    	$(":text").prop("readonly", true);
   		    	$(":submit").prop("disabled", true);
		        $('#container_overlay').show();	
			$(this).parents('form').submit()
		    });
		});
	</script>
{% endblock %}

Fix the spinning wheel with the Chrome browser
Fix the spinning wheel with the Chrome browser

If we disable the submit button, the form is not posted with Chrome mobile. This
workaround allows disabling the button and post the form correctly.
