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

    This is the view to search information about films by protagonist. This
    view shows a form with an input element to insert a pattern or a name of film
    protagonist, 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 protagonista</h1><hr>
        <form data-ng-submit="listFilmsByProtagonist()" novalidate>
            <div>
                <label for="patternForFilmProtagonist">Nombre del protagonista:</label>
                <div>
                    <input type="text" data-ng-model="protagonist"
                           id="patternForFilmProtagonist"
                           placeholder="Nombre de protagonista" required>
                </div>
            </div><br>
            <div>
                <input type="submit" value="Buscar películas">
            </div><hr>
            <br>
            <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>