<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Wordfish Application Generator</title>

        <!-- CSS -->
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
        <link rel="stylesheet" href="{{ url_for('static',filename='bootstrap/css/bootstrap.min.css') }}">
        <link rel="stylesheet" href="{{ url_for('static',filename='font-awesome/css/font-awesome.min.css') }}">
	<link rel="stylesheet" href="{{ url_for('static',filename='css/form-elements.css') }}">
        <link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->

        <!-- Favicon -->
        <link rel="shortcut icon" href="{{ url_for('static',filename='ico/favicon.ico') }}">

    </head>

    <body>
        <!-- Top menu -->
	    <nav class="navbar navbar-inverse navbar-no-bg" role="navigation">
                <div class="container">
		    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-navbar-1">
                            <span class="sr-only">Toggle navigation</span>
			    <span class="icon-bar"></span>
			    <span class="icon-bar"></span>
			    <span class="icon-bar"></span>
			</button>
		        <a class="navbar-brand" style="height:255px; width:300px" href="index.html">Configure your Wordfish Application</a>
		    </div>
	   	    <!-- Collect the nav links, forms, and other content for toggling -->
		    <div class="collapse navbar-collapse" id="top-navbar-1">
	                <ul class="nav navbar-nav navbar-right">
			    <li>
			        <span class="li-text">Ways to</span> 
				    <a href="#"><strong> contact</strong></a> 
				    <span class="li-text"> us:</span> 
				    <span class="li-social">
					<a href="#"><i class="fa fa-envelope"></i></a> 
				    </span>
			    </li>
			</ul>
		    </div>
                </div>
	    </nav>

            <!-- Top content -->
            <div class="top-content">	
            <div class="inner-bg">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2 text">
                            <h1><strong>Wordfish</strong> Application Configuration</h1>
                            <div class="description">
                            	<p>
                            	</p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6 col-sm-offset-3 form-box">
                            <form role="form" action="{{ url_for('select') }}" method="post" enctype="multipart/form-data" class="registration-form">

			               <!--Corpus-->
                                        <fieldset>
		                        	<div class="form-top">
		                        	    <div class="form-top-left">
		                        		<h3>Corpus</h3>
		                            		<p>Please choose your corpus</p>
		                        	    </div>
		                        	    <div class="form-top-right">
		                        	    <i class="fa fa-book"></i>
		                                </div>
  		                        </div>
		                        <div class="form-bottom">
                                            <h3 class="info-text"> We found {{ this_many_corpus }} valid corpus</h3>

                                            <div class="col-sm-6 col-sm-offset-1">
                                        </div>

                                        <!-- corpus choices will be appended here-->               
                                        <div class="col-sm-10 col-sm-offset-1" id="corpus">

                                        </div>

                                                  <button type="button" class="btn btn-previous">Previous</button>
			                          <button type="button" class="btn btn-next">Next</button>
                                               </div>
			               </fieldset>
			                    
			               <!--Terminology-->
                                       <fieldset>
		                        	<div class="form-top">
		                        		<div class="form-top-left">
		                        			<h3>Terminology</h3>
		                            		<p>please choose your terminology</p>
		                        		</div>
		                        		<div class="form-top-right">
		                        			<i class="fa fa-letter"></i>
		                        		</div>
		                            </div>
		                            <div class="form-bottom">

                                            <h3 class="info-text"> We found {{ this_many_terms }} valid terminologies</h4>

                                            <!-- terminology choices will be appended here-->               
                                            <div class="col-sm-10 col-sm-offset-1" id="terminology">

                                        </div>

                                                <button type="button" class="btn btn-previous">Previous</button>
				                <button type="submit" class="btn">Create!</button>
				            </div>
			                </fieldset>

		                    
		                    </form>
		                    
                        </div>
                    </div>
                </div>
            </div>
            
        </div>


        <!-- Javascript -->
        <script src="{{ url_for('static',filename='js/jquery-1.11.1.min.js') }}"></script>
        <script src="{{ url_for('static',filename='bootstrap/js/bootstrap.min.js') }}"></script>
        <script src="{{ url_for('static',filename='js/jquery.backstretch.min.js') }}"></script>
        <script src="{{ url_for('static',filename='js/retina-1.1.0.min.js') }}"></script>
        <script src="{{ url_for('static',filename='js/scripts.js') }}"></script>
        
        <!--[if lt IE 10]>
            <script src="{{ url_for('static',filename='js/placeholder.js') }}"></script>
        <![endif]-->

    <script>
    $(document).ready(function() {

 	corpus = {{ corpus | safe }}
 	terms = {{ terms | safe }}

        // Add corpus choices
	for (i=0;i<corpus.length;i++){
	    $("#corpus").append('<div class="checkbox"><label><input type="checkbox" value="' + corpus[i][0].tag +'" name="' + corpus[i][0].tag +'">' + corpus[i][0].name +'</label></div>')
	}

        // Add terms choices
	for (i=0;i<terms.length;i++){
	    $("#terminology").append('<div class="checkbox"><label><input type="checkbox" value="' + terms[i][0].tag +'" name="' + terms[i][0].tag +'">' + terms[i][0].name +'</label></div>')
	}

});
</script>

    </body>

</html>
