<!--
    AngularJS template. Created by fran lopez on 14/12/15.

    This is the view to search information about films by title. This view shows
    a form with an input element to insert a pattern or a film title saved in
    database.

    If there are films matched to inserted pattern, these films will be listed in
    another view, where the user can access to view details of every film.
-->

    <section data-ng-controller="FilmsController">
        <h1>Búsqueda de películas por título</h1><hr>
        <form data-ng-submit="listFilmsByTitle()" novalidate>
            <div>
                <label for="patternForFilmTitle">Título de película:</label>
                <div>
                    <input type="text" data-ng-model="title"
                           id="patternForFilmTitle" placeholder="Título de película"
                           required>
                </div>
            </div><br>
            <div>
                <input type="submit" value="Buscar películas">
            </div><hr>
            <div data-ng-show="error">
                <strong data-ng-bind="error"></strong>
            </div>
            <br>
            <a data-ng-href="/#!/films">Volver al menú anterior</a>
        </form>
    </section>