<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<spring:url value="/resources/static/css/members.css" var="membersCss" />
<link href="${membersCss}" rel="stylesheet" />

<div class="container">
    <div class="feedback">
        <div class="alert alert-success general-success" role="alert">
            <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
            <span><strong>Success: </strong></span>
            <span class="text"></span>
            <span class="glyphicon glyphicon-remove"></span>
        </div>

        <div class="alert alert-danger general-error" role="alert">
            <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
            <span class="sr-only">Error:</span>
            <span class="text"></span>
            <span class="glyphicon glyphicon-remove"></span>
        </div>
    </div>

    <div class="members-content"></div>

    <button type="button" class="btn btn-info add-member-btn" data-toggle="modal" data-target="#add-member-modal">
        <span class="glyphicon glyphicon-plus"></span>
        Add a new project member
    </button>

    <!-- modal add member -->
    <div class="modal fade" id="add-member-modal" tabindex="-1" role="dialog" aria-labelledby="#add-member-modal-label">
        <div class="modal-dialog">
            <div class="modal-content">
                <form id="add-member-form" action="#">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="add-member-modal-label">New member</h4>
                    </div>

                    <div class="modal-body">
                        <input type="email" name="email" id="memberEmail" class="form-control" placeholder="Email address" required maxlength="35" />
                        <input type="text" name="role" id="memberRole" class="form-control" placeholder="Role" required maxlength="30" />
                    </div>

                    <div class="modal-footer">
                        <button type="button" id="add-member-close" class="btn btn-default" data-dismiss="modal">Cancel</button>
                        <button type="submit" id="add-member-btn" class="btn btn-primary">Add member</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<spring:url value="/resources/static/js/members.js" var="membersJs" />
<script src="${membersJs}"></script>